SpiderStrategies / node-tweet-stream

Node twitter module to hook into the public filter streaming, seamlessly updating the tracking keywords.
210 stars 43 forks source link

Return the string tracked on the t.on() event #32

Closed mihaben closed 8 years ago

mihaben commented 9 years ago

Return the string tracked on the t.on() event. Useful for multiple tracking.

I´m doing multiple t.track() but I need to do different actions for each string.

nathanbowser commented 9 years ago

PR welcome

mvdwalle commented 8 years ago

This can become pretty complex. We do this in our company and especially with multiple keywords, users and locations the code for doing this is quite a lot larger than this entire library.

Also what would you do in case of a tweet matching multiple keywords, users or locations.

We did quite some research in why you get certain tweets from the stream and it is not always clear.

nathanbowser commented 8 years ago

@mvdwalle Great point.

@mihaben This is tricky because we have a single stream open to twitter, and when they send us information, they don't tell us why they are sending it. Which means you have to try and keep track of this in your own user space.

I have a simple project https://github.com/SpiderStrategies/twitter-search-terms which splits a tweet based on search terms matching twitter's algorithm. We use it to figure out what terms are in a tweet, and then figures out why they may have sent it based on what we're tracking.

Hope that helps.