verify_credentials Signature - Error 32


#1

I’m trying to use the Twitter API without the help of Abraham’s code.

Signing in and getting the access token is all done.

However, every time I make a request to account/verify_credentials, it returns Error 32 “Could not authenticate you”

I think this is because the OAuth Signature is wrong. How do I exactly create a correct OAuth signature?

Are there example code somewhere for this?


#2

Are you assigning the access tokens to the instance of TwitterOAuth you are creating?

This is explained in the Step 8 of the lib README: https://github.com/abraham/twitteroauth

If are using your own account to connect, you can create your access tokens at apps.twitter.com and then skip directly to Step 8:

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);


#3

Like I said above, getting the Access token is all fine.

it’s the Signature I’m having trouble with. I’m pretty sure. What is the proper way to generate a signature?

Also I’m not using Abraham’s code.