diff --git a/lib/Twitter.js b/lib/Twitter.js index b060392..8cbf9ca 100644 --- a/lib/Twitter.js +++ b/lib/Twitter.js @@ -27,7 +27,7 @@ Twitter.prototype.getOAuthRequestToken = function (next) { this.oauth.getOAuthRequestToken(function (error, oauth_token, oauth_token_secret, results) { if (error) { console.log('ERROR: ' + error); - next(); + next(error); } else { var oauth = {}; @@ -45,7 +45,7 @@ Twitter.prototype.getOAuthAccessToken = function (oauth, next) { function (error, oauth_access_token, oauth_access_token_secret, results) { if (error) { console.log('ERROR: ' + error); - next(); + next(error); } else { oauth.access_token = oauth_access_token; oauth.access_token_secret = oauth_access_token_secret; @@ -190,7 +190,7 @@ Twitter.prototype.doPost = function (url, post_body, error, success) { .replace(/\(/g, "%28") .replace(/\)/g, "%29") .replace(/\*/g, "%2A"); - //(url, oauth_token, oauth_token_secret, post_body, post_content_type, callback + //(url, oauth_token, oauth_token_secret, post_body, post_content_type, callback this.oauth.post(url, this.accessToken, this.accessTokenSecret, post_body, "application/x-www-form-urlencoded", function (err, body, response) { console.log('URL [%s]', url); if (!err && response.statusCode == 200) { @@ -210,4 +210,4 @@ Twitter.prototype.buildQS = function (params) { if (!(typeof exports === 'undefined')) { exports.Twitter = Twitter; -} \ No newline at end of file +}