Reputation: 684
I'm trying to get twitter request token and access token using node-twitter-api
here is my code
twitterAPI = require('node-twitter-api');
function setSettingForTwitter(request, response, sessionManager) {
var twitter = new twitterAPI({
consumerKey: '1YTLohgHVA9L2Mri0bM2692Rl',
consumerSecret: 'sGlYSxrs1uhS7v8qGY5fb2S8xLeNT2nACmchpONcjHO0bMfmzo',
callback: 'http://localhost.com/app/socialNetworkSetting/respondFromTwitter'
});
twitter.getRequestToken(function(error, requestToken, requestTokenSecret, results){
if (error) {
console.log("Error getting OAuth request token : " , error);
} else {
//store token and tokenSecret somewhere, you'll need them later; redirect user
}
}); }
but I receive the error below
Error getting OAuth request token : { statusCode: 401, data: '\n\n Desktop applications only support the oauth_callback v alue \'oob\'\n /oauth/request_token\n\n' }
help me on this please!
Upvotes: 0
Views: 121
Reputation:
Looking at this post it says:
If you're getting this error, it means that you haven't configured your application to accept dynamic URL-based callbacks. You can enable this behavior by providing a placeholder callback URL on your application detail edit screen.
So you would need to
Upvotes: 1