I’ve read through the OAuth docs from Twitter (which seem great), requested API keys, and a token for my Twitter account.
I’ve been able to call into
https://api.twitter.com/1.1/account/verify_credentials.json and pull back my info without any issues.
Happy with some code that signs, sorts etc. I’ve moved onto requesting a token for user authorization.
This is a snippet of what’s working (pulling my info):
This is what I’m signing with my (consumerSecret&accessTokenSecret)
This is my
This is a snippet of my token request, which isn’t working
What I’m signing (with just my consumerSecret)
The only differences with either request is that
- the working one gets signed with
consumerSecret&accessTokenSecretand the other is signed with just
- the non-working one has
oauth_callbackadded to the authorization header, with an encoded URL (which gets re-encoded during the signing process)
- the working one has my accessToken added to the authorization header, and the other doesn’t
My clock is good, and I do get good requests from the first one, so that shouldn’t be an issue. I’ve removed the callback from the second (I know it’s required, but just to see if I get some other error, as that’s the only new thing added). Is there something blatantly obvious that I’m missing?