node-twitter icon indicating copy to clipboard operation
node-twitter copied to clipboard

A graceful way to connect/disconnect from streams to switch filters?

Open brianzhou13 opened this issue 6 years ago • 1 comments

I'm using the streaming API to get real-time tweets for a specific location; however, the user may want tweets relevant to another geolocation after awhile, and currently the way I think to do this would be to destroy the stream, then wait X-amount of time, and attempt to re-connect with different args.

Is there a better way to do this?

brianzhou13 avatar Aug 25 '18 19:08 brianzhou13

What you've described is the right way to do this, and is actually quite fast. Here's a test with twitter-lite, a modern Node/browser Twitter client library.

dandv avatar Dec 21 '18 04:12 dandv