Jump to content

nodejs twit problem

hi linustechtips,

 

i am writing a program that shows tweets with a specific word in it.

this works all great.

the libarie i am using to get the tweets is twit (https://www.npmjs.org/package/twit)

but i also have a function that let the user change the filter.

 here is the server(nodejs) code:

io.sockets.on('connection', function (socket) {        socket.on('filtername', function (data) {        console.log(data);        var stream_filter = T.stream('statuses/filter', { track: data });        stream_filter.on('tweet', function (tweet) {            io.emit(data, tweet);        });    });}); 

but here is my problem and i am trying to fix it for weeks.

for some reason the server can only handel one user defined tweet filter.

so it is not asynchronous.

 

can some one help me with this please?

 

Noah

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×