node-oauth
node-oauth copied to clipboard
Twitter getOAuthRequestToken does not work with callback
new oauth.OAuth(
"https://twitter.com/oauth/request_token", "https://twitter.com/oauth/access_token",
key, secret, "1.0A", callback, "HMAC-SHA1"
)
.getOAuthRequestToken(function (error, oauth_token, oauth_token_secret, results) {
console.log(error)
})
{ statusCode: 401,
data: '<?xml version="1.0" encoding="UTF-8"?>\n<hash>\n <error>Desktop applications only support the oauth_callback value \'oob\'</error>\n <request>/oauth/request_token</request>\n</hash>\n' }
this works when using null as the callback url but fails when using anything else.
Twitter recognizes your app as a desktop one. Add a dummy callback URL like example.com at dev.twitter.com
I' ve the same problem and it's not solved adding a dummy url, i already had mine
{ statusCode: 401,
data: '\n