Filter retweets using the twitter API

Asked

Viewed 121 times

2

I’m making a search tool using the twitter API to receive tweets. However, I am having a problem related to retweets, every search I do, more than half of the results are retweets. Is there a way for me to filter the retweets without being using '-RT' during the search? (even with -RT I still get several retweets that don’t contain it)

My search tool is in php and the lib I’m using is Twitteroauth.

  • 1

    Are you using some Twitter API PHP lib, or have you done it all from scratch? The answer depends a little on this.

  • 2

    Anyway, the response of a search is JSON and one of the attributes is called "retweeted", if it is false, is an original tweet. Remembering that there is "old retweet" and "new reweet", the old mode was informal, the RT prefix was a language created by Twitter clients, in the new mode retweet is directly supported by the API, I want to believe that nowadays the "old retweets" are extinct.

  • @epx I’m using the Twitteroauth lib

  • 1

    Like it, it doesn’t hide the nature of the Twitter API. It’s like I said before, look for the 'retweeted' attribute in every tweet received via API.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.