BoyCook / TwitterJSClient

Twitter client written in JavaScript packaged as a node module
GNU General Public License v2.0
562 stars 176 forks source link

Twitter.getOAuthRequestToken returns object but treated as string in logging #49

Open Daven- opened 8 years ago

Daven- commented 8 years ago

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);
        }
    });
};