Hi,
Okay, I’ve figured it all out. My problems with the URI based parameter passing was that QT was double-encoding. My overall problems were not related to how I passed the parameters though, as both the query string and authorization header aspects work.
My problems can be summarized as two things:
-
The parameters as passed in the query string/authorization header HAVE to be in alphabetical/lexicographical sorted order. Twitter does not sort these and takes it as you passed it.
-
The callback parameter that is required WILL cause the request to fail if you pass it, so mentally read the ‘required’ as ‘required to not be passed’ in the API documentation. Note that all of the requests below are exactly the same sans the one with the callback added.
sorting proof:
POST /oauth/request_token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: blahblahblah
Authorization: OAuth oauth_nonce="VDXVDZXFQICOHEOZYZZZESZZYCMUUHDA", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1340309081", oauth_consumer_key="8BpuepyGkukZn8R0ynXHMg", oauth_signature="h3FHUnmB9JlxbFe7zmWQwxn1C1A=", oauth_version="1.0"
Content-Length: 0
Connection: Keep-Alive
Accept-Encoding: gzip
Accept-Language: en-US,*
Host: api.twitter.com
HTTP/1.1 401 Unauthorized
Date: Thu, 21 Jun 2012 20:07:42 GMT
POST /oauth/request_token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: blahblahblah
Authorization: OAuth oauth_consumer_key=“8BpuepyGkukZn8R0ynXHMg”, oauth_nonce=“VDXVDZXFQICOHEOZYZZZESZZYCMUUHDA”, oauth_signature=“h3FHUnmB9JlxbFe7zmWQwxn1C1A%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1340309081”, oauth_version="1.0"
Content-Length: 0
Connection: Keep-Alive
Accept-Encoding: gzip
Accept-Language: en-US,*
Host: api.twitter.com
HTTP/1.1 200 OK
Date: Thu, 21 Jun 2012 20:08:37 GMT
Callback proof:
POST /oauth/request_token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: blahblahblah
Authorization: OAuth oauth_callback="ooboauth_consumer_key=“8BpuepyGkukZn8R0ynXHMg”, oauth_nonce=“VDXVDZXFQICOHEOZYZZZESZZYCMUUHDA”, oauth_signature=“BEL0ixeTHpgGLjjaC55GVrNGnmk%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1340309081”, oauth_version="1.0"
Content-Length: 0
Connection: Keep-Alive
Accept-Encoding: gzip
Accept-Language: en-US,*
Host: api.twitter.com
HTTP/1.1 401 Unauthorized
Date: Thu, 21 Jun 2012 20:11:18 GMT
POST /oauth/request_token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: blahblahblah
Authorization: OAuth oauth_consumer_key=“8BpuepyGkukZn8R0ynXHMg”, oauth_nonce=“VDXVDZXFQICOHEOZYZZZESZZYCMUUHDA”, oauth_signature=“h3FHUnmB9JlxbFe7zmWQwxn1C1A%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1340309081”, oauth_version="1.0"
Content-Length: 0
Connection: Keep-Alive
Accept-Encoding: gzip
Accept-Language: en-US,*
Host: api.twitter.com
HTTP/1.1 200 OK
Date: Thu, 21 Jun 2012 20:12:19 GMT
I can already tell, this code is going to be ‘fun’ to write…
TYVM for the attempted help, cheers. case closed.