Hi,
I’m working on a web application that requires twitter integration, and I’m failing when trying to get an access token. I get a 401 error with the message “Failed to validate oauth signature and token.” I’m not sure where I’m slipping up. I’ve tested my signing procedure using the sample data on the site, and it appears to be generating the correct signature.
Here is a sample signature base string I’m generating:
POST&https%3A%2F%2Fapi.twitter.com%2Foauth%2Frequest_token&oauth_callback%3Doob%26oauth_consumer_key%3DQRyK5Rz3EhHh2QgjqbCbiA%26oauth_nonce%3Dc4a0c240b96911e1a14dcd0663c7d609%26oauth_signature_mehtod%3DHMAC-SHA1%26oauth_timestamp%3D1340039971%26oauth_version%3D1.0
I’m making a POST to this URL, with the following Authentication header.
https://api.twitter.com/oauth/request_token
Authorization: OAuth oauth_callback="oob", oauth_consumer_key="QRyK5Rz3EhHh2QgjqbCbiA", oauth_timestamp="1340040370", oauth_nonce="b2194ce0b96a11e1b59a251df3e7517a", oauth_signature_method="HMAC-SHA1", oauth_version="1.0", oauth_signature="Gf5TjH9w161P4n4Q6tyV0Uixu2I%3D"
Any ideas as to what I’m missing?