Skip to content

Instantly share code, notes, and snippets.

@lukaswilkeer
Created February 8, 2015 15:40
Show Gist options
  • Save lukaswilkeer/d0926e084106d0117de8 to your computer and use it in GitHub Desktop.
Save lukaswilkeer/d0926e084106d0117de8 to your computer and use it in GitHub Desktop.
Twitter timeline stream.
var twitter = require('ntwitter');
var consumer_key = "";
var consumer_secret = "";
var access_token_key = "";
var access_token_secret = "";
var t = new twitter({
consumer_key: consumer_key
, consumer_secret: consumer_secret
, access_token_key: access_token_key
, access_token_secret: access_token_secret
});
t.stream('user'
, { track: 'dev_trend' }
, function(stream){
stream.on('data', function(tweet){
// Quando você "curte" um comentário, ele retorna o texto como undefined
console.log(tweet.created_at);
console.log(tweet.text);
console.log('-------');
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment