I have the “oauth_token” and “oauth_token_secret” values stored in the database. Is it possible to retrieve the twitter account’s user name from just these two values?
I have the oauth_token and oauth_token_secret values stored in the database. Is it possible
Share
You can do it with this REST method :
GET https://api.twitter.com/1/account/verify_credentials.json(or.xmlif you prefer XML results instead of JSON). It is an authenticated request, so you will pass theoauth_tokenin theAuthorizationheader as usual. If the request is successful, it will return you the 200 OK HTTP code with the corresponding user. Otherwise it will return a 401 return code. The Twitter application used for the request has to authorized by the user of course.