TwitterJSClient icon indicating copy to clipboard operation
TwitterJSClient copied to clipboard

Twitter.getOAuthRequestToken returns object but treated as string in logging

Open Daven- opened this issue 9 years ago • 0 comments

Can't see what the error actually is since all you get is 'ERROR: [object Object]'

Twitter.prototype.getOAuthRequestToken = function (next) {
    this.oauth.getOAuthRequestToken(function (error, oauth_token, oauth_token_secret, results) {
        if (error) {
            console.log('ERROR: ' + error);
            next();
        }
        else {
            var oauth = {};
            oauth.token = oauth_token;
            oauth.token_secret = oauth_token_secret;
            console.log('oauth.token: ' + oauth.token);
            console.log('oauth.token_secret: ' + oauth.token_secret);
            next(oauth);
        }
    });
};

Daven- avatar Sep 12 '16 18:09 Daven-