how to follow statuses of a list of users using twitter streaming api in node.js with twit module

108 views
Skip to first unread message

Sarfaraz Hussain

unread,
Sep 5, 2014, 5:37:44 PM9/5/14
to nod...@googlegroups.com

you can also answer this question on stackoverflow

I am using twit node.js module for twitter api, I am trying to get status stream of a list of users by using their id but when i run the script it the following error

Error: Bad Twitter streaming request: 406

Following is the code

var http = require('http')
, server = http.createServer(app)
, Twit = require('twit')
server.listen(4040);

var T = new Twit({
consumer_key:           'abc'
, consumer_secret:      'abc'
, access_token:         'abc'
, access_token_secret:  'abc'
});
var watchList = ['@Kashmala_Tariq', '@Mushahid', '@Fbuttho'];
var stream = T.stream('statuses/filter', { follow : watchList });

stream.on('tweet', function (tweet) {
console.log('@'+tweet.user.screen_name + ':::' + tweet.text);
});

this is the link to the api i am using twittwit-module

please guide me what is it that i am doing wrong in this script

Thomas Murphy

unread,
Sep 8, 2014, 2:53:03 PM9/8/14
to nod...@googlegroups.com
Are the objects in the Twit instantiation hash actually 'abc'?

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/14b4c58f-294c-4728-8b31-b52608ef852a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages