Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lib/Twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Twitter() {
var configPath = "data/twitter_config";
try {
var config = process.env;

this.consumerKey = config.twitterConsumerKey;
this.consumerSecret = config.twitterConsumerSecret;
this.accessToken = config.twitterAccessToken;
Expand Down Expand Up @@ -143,6 +143,11 @@ Twitter.prototype.getUser = function (params, error, success) {
var url = this.baseUrl + path;
this.doRequest(url, error, success);
};
Twitter.prototype.getUserLookup = function (params, error, success) {
var path = '/users/lookup.json' + this.buildQS(params);
var url = this.baseUrl + path;
this.doRequest(url, error, success);
};

Twitter.prototype.getFollowersList = function (params, error, success) {
var path = '/followers/list.json' + this.buildQS(params);
Expand Down Expand Up @@ -195,7 +200,7 @@ Twitter.prototype.retweet = function(id, error, success){
var url = this.baseUrl + '/statuses/retweet/'+id+'.json';
this.doPost(url, {}, error, success);
}

Twitter.prototype.unretweet = function(id, error, success){
var url = this.baseUrl + '/statuses/unretweet/'+id+'.json';
this.doPost(url, {}, error, success);
Expand All @@ -208,7 +213,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) {
if (DEBUG) console.log('URL [%s]', url);
if (!err && response.statusCode == 200) {
Expand Down