I'm trying to find data about a keyword's use within the United States, using node and socket.io. I know that the API itself does not support the logical AND of the track and locations filters, and that I must write a custom filter for one of them (in this case track, as I'm currently streaming by location). I need some tips on how to go about this since it seems like once I start the stream event, I can't filter out the tweets that are outputted to the client side. Any ideas?
Asked
Active
Viewed 996 times
1 Answers
1
You can get public real time tweets using this streaming api just replace keyword #f8 with anything you want to track .
I am also working on location based tweets but i haven't figured it out yet. As soon i will figure that out i will update here.
//INITIALIZING TWITTER API
var Twitter = require('twitter');
var client = new Twitter({
consumer_key: 'asdfa',
consumer_secret: 'asdf',
access_token_key: 'asdf',
access_token_secret: 'asdf'
});
client.stream('statuses/filter', {track: '#f8'}, function(stream) {
stream.on('data', function(tweet) {
console.log("\n"+tweet.text);
});
stream.on('error', function(error) {
throw error;
});
});

Skyyy
- 1,539
- 2
- 23
- 60