Skip to content

Instantly share code, notes, and snippets.

@jshawl
Created February 3, 2014 00:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jshawl/8777407 to your computer and use it in GitHub Desktop.
Save jshawl/8777407 to your computer and use it in GitHub Desktop.
var Twit = require('twit');
var T = new Twit({
consumer_key: '...'
, consumer_secret: '...'
, access_token: '...'
, access_token_secret: '...'
});
var userid = '...';
var stream = T.stream('statuses/filter', { follow: userid })
stream.on('tweet', function (tweet) {
T.post('favorites/create', {id: tweet.id_str}, function(err, reply){
if (err) console.log(err);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment