Reputation: 999
Is there any sample Demo for Streaming Tweets from Twitter using nTwitter?
I have configured my access and secret keys from dev.twitter.com.
But still a fully guided Tutorial would Help I referred to http://blog.semmy.me/post/17390049513/streaming-twitter-with-ntwitter-and-node-js This Tutorial, But couldn't figure out the client side.
Also tried using socket.io but to no avail.
Upvotes: 3
Views: 1840
Reputation: 374
What are you having trouble with? Setting up a stream is super easy - the blog you posted even has the code samples all ready:
var t = new twitter({
consumer_key: 'your',
consumer_secret: 'twitter',
access_token_key: 'keys',
access_token_secret: 'here'
});
t.stream(
'statuses/filter',
{ track: ['awesome', 'cool', 'rad', 'gnarly', 'groovy'] },
function(stream) {
stream.on('data', function(tweet) {
console.log(tweet.text);
});
}
);
However, you should check out other forks of ntwitter like mtwitter, as ntwitter hasn't been updated in a long time. If streaming is the only thing you need, you can check out my fork https://github.com/mileszim/twat that handles all the reconnection and backoff guidelines.
Upvotes: 2
Reputation: 1
i came accross this demo a while ago its a complete demonstration of nodejs and ntwitter also easy to understand. this should do
Upvotes: 0