desmondmorris / node-twitter

Client library for the Twitter REST and Streaming API's.
https://www.npmjs.com/package/twitter
MIT License
1.27k stars 237 forks source link

statuses/filter streaming does not work #268

Open OKNoah opened 7 years ago

OKNoah commented 7 years ago

I'm using the code below.

twitterClient.stream('statuses/filter', { follow: 1234 }, (stream) => {
    stream.on('data', tweet => {
      console.log('tweet', tweet)
    })

    stream.on('error', error => {
      console.log('error', error)
    })
  })

When I attempt to tweet from account 1234, the console.log('tweet', tweet) does not fire. I've tried tweeting, replying, etc, and waiting some time.

Am I misunderstanding how this works or is something wrong?

OKNoah commented 7 years ago

Stackoverflow question also getting no replies: https://stackoverflow.com/questions/47384200/how-to-stream-tweets-of-one-user-using-follow

yousefissa commented 6 years ago

I am also having this issue except I am getting a 401 error. Seems to be a common issue. Any update?

demilp commented 6 years ago

If you are having a 401 error, you might me using "application only authentication". https://developer.twitter.com/en/docs/basics/authentication/overview/application-only.html

"And it will not be able to:

Post Tweets or other resources; Connect to Streaming endpoints; Search for users; Use any geo endpoint; Access Direct Messages or account credentials;"

dandv commented 5 years ago

This package is no longer maintained. statuses/filter works fine in twitter-lite. Here's a test.