I am trying to retrieve the most popular hashtags on twitter using ntwitter module for node.js
/*Set Twitter Properties */
var twitterKey= new twitter(
{
consumer_key: 'xxxx',
consumer_secret: 'xxxx',
access_token_key: 'xxxx',
access_token_secret: 'xxxx'
}
);
/*On Connection from a client fetch twitter status keeping track of #tags*/
io.sockets.on('connection', function(socket)
{
twitterKey.stream('statuses/filter', {track: ['#']}, function(stream) {
stream.on('data',function(data)
{
console.log(data.text);
}
}
I have previously used the track parameter to extract tweets with certain keywords. I have created a data structure to keep track of the top repeating hashtags, however, I feel my approach of extracting hash tags isn't the best way.
Aucun commentaire:
Enregistrer un commentaire