Tuesday, 15 April 2014

Heroku, Socket.IO, Node.js -


I have a node on myoku Installing the JS Twitter Streaming App. It works perfectly until the second client makes the connection. This is something I did not expect until I showed it to anyone: (

I'm using tweets-pipes for Twitter StereoM API functionality:

To work on Socket.IO, Heroko I followed these instructions:

  io.configure (function () (io.set ("transports", ["xhr-polling"]) ; Io.set ("Voting Period", 10);});   

In my app js file I have

  io.sockets.on ('Connection', function (socket) {Tp.stream ('statuses / filter', params, false, function (st M) {stream.on ('tweet', function) {socket.emit ('tweet', tweet);});});});   

Again, this All works very well until another customer goes to the page, then the original connection is lost, while the other is the client connection. Any ideas? I'm a bit new Socket.IO stuff. < P>

AFAIK You can have only one active stream per Twitter handle. You can not use tp.stream for another client .

Source:



No comments:

Post a Comment