Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to exclude retweets from the streaming api #286

Open
jgamedev opened this issue Jul 20, 2016 · 4 comments
Open

how to exclude retweets from the streaming api #286

jgamedev opened this issue Jul 20, 2016 · 4 comments

Comments

@jgamedev
Copy link

I know there has been a similar question for the REST api.

Seems to be same solution proposed in this stackoverflow answer:
http://stackoverflow.com/questions/38208493/twitter-api-exclude-retweets-in-stream

However, like the user who posted the question says in the comments, it doesn't seem to work as I don't receive any tweets after applying it.

I made sure I was using very popular track terms

NOTE: because this is sort of a trivial need, it would be great if the actual solution was added to the Read.ME

@jgamedev jgamedev changed the title exclude retweets from streaming api how to exclude retweets from the streaming api Jul 20, 2016
@hoodsy
Copy link

hoodsy commented Jul 29, 2016

@jgamedev I was looking for a similar solution, and wrote a simple function to help out. Basically, if the tweet picked up in the stream is anything other than a basic tweet (i.e. a retweet, reply, etc), it returns true.

function isReply(tweet) {
  if ( tweet.retweeted_status
    || tweet.in_reply_to_status_id
    || tweet.in_reply_to_status_id_str
    || tweet.in_reply_to_user_id
    || tweet.in_reply_to_user_id_str
    || tweet.in_reply_to_screen_name )
    return true
}

@a1xon
Copy link

a1xon commented Dec 5, 2016

So there is still no better solution? twitter is providing no filter for the stream? why? this creates tons of useless traffic and data.

@Fizion101
Copy link

I also wish Twitter would allow filtering of the Stream API, specifically for exclude re-tweets and replies... at least re-tweets. If I am trying to do a live feed of CNN or god forbid Justin Bieber / anyone with millions of followers my server gets bombarded with 20-100 retweets per second... You can filter out in the search API, so I don't understand why it's not a trivial matter to include it in Stream API as well. It seems to be a common request and would lower overhead considerably.

@Anatoly03
Copy link

So there is still no better solution? twitter is providing no filter for the stream? why? this creates tons of useless traffic and data.

Checking by 4 years later, is it known if there's a better way to filter tweets or is this solution still the only up-to-date?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants