Reputation: 2207
I am trying to create a social registration system. So far I implemented the function for sign up with Facebook. Now, when trying to create the sign up with Twitter account, I implemented this:
var client = new Twitter({
consumer_key: 'oN******',
consumer_secret : 'Za****',
access_token_key: '9*****',
access_token_secret: 'N0*****'
});
client.get( 'users/show.json', { id: '9***' }, function(error, user, response){
if( error ) { res.json( JSON.stringify( error ) ); return; }
I hardcoded my user id and my app id/secret, consumer key/ secret.
I keep getting the error:
{"errors":[{"code":32,"message":"Could not authenticate you."}]}' }
Why does this error appear and how to solve it?
Upvotes: 4
Views: 2034
Reputation: 2207
At Keys and Access Tokens page, I clicked on Regenerate My Access Token And Token Secret button (see below)
I replaced them in my code
Now it works perfectly.
Upvotes: 4