Created
February 8, 2015 15:40
-
-
Save lukaswilkeer/d0926e084106d0117de8 to your computer and use it in GitHub Desktop.
Twitter timeline stream.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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