Hi
- I am using twitteroauth library in our ui(using cakephp), oauth/request_token, oauth/authorize, oauth/access_token and account/verify_credentials in ui side all have correct response
- But we need call account/verify_credentials in our node js api side, so I pass oauth_token and oauth_token_secret from oauth/access_token api response to our api.
- in Node js api, I use esmondmorris’ twitter client library(https://github.com/desmondmorris/node-twitter)
var client = new Twitter({
consumer_key: sails.config.constants.TWITTER_CUSTOMER_KEY,
consumer_secret: sails.config.constants.TWITTER_CUSTOMER_SECRET,
access_token_key: oauth_token,
access_token_secret: oauth_token_secret,
});
client.get('account/verify_credentials’function(err, account, response){
}) always return {‘code’:32, ‘message’:‘Could not authenticate you’}
Note api and ui are different ip and domain name
Anyone can help me?