facebook graph api - How to validate a Twitter access token from the server -
the client able authenticate using hello.js facebook , send access token server get graph.facebook.com/me?access_token=xx
, if correct returns user's profile info.
i want same twitter after reading documentation don't understand endpoint should hit.is possible rest call?
you need hit endpoint
https://dev.twitter.com/rest/reference/get/account/verify_credentials
like (using request module):
const oauth={ consumer_key:config.get('twitter.consumerkey'), consumer_secret:config.get('twitter.consumersecret'), token:oauthtoken, token_secret:oauthtokensecret } requestasync({ url:'https://api.twitter.com/1.1/account/verify_credentials.json', method:'get', oauth, })
Comments
Post a Comment