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

Stream a specifics user accounts tweets (but not anything else)

Open Ev1dentFir3 opened this issue 7 years ago • 2 comments

So I am trying to track the tweets a single account. I'm able to stream with twitter.stream('statuses/filter', {track: 'WarframeAlerts'}, function(stream) but it's also spitting out every tweet other users send them.

How can I make it so that it only shows the tweets, and not the tweets they receive. Thanks

Ev1dentFir3 avatar Sep 07 '17 10:09 Ev1dentFir3

You should use follow (filters by users) instead of track (filters by keywords or phrases) in the end point parameters. From: https://developer.twitter.com/en/docs/tweets/filter-realtime/api-reference/post-statuses-filter.html

vallel avatar Oct 16 '17 01:10 vallel

Exactly. Here's a demo with twitter-lite, which is a modern and actively maintained Twitter library.

dandv avatar Dec 21 '18 04:12 dandv