Twitter API: Check if a tweet is a retweet

前端 未结 9 2406
南笙
南笙 2020-12-15 05:33

I have found this question. However I think this has changed on API version 1.1.

If I use the search/tweets method, how can I see if the tweet is a RT?

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 06:18

    As @Joe Mayo said, check for the retweeted_status key on the status object.

    I have an example that is not caught by @Apoorv Ashutosh's suggestion.

    See: https://twitter.com/gppvt/status/474162466776449024 this will redirect (because it is a retweet) to the original tweet. However if you get this tweet through the twitter API, it has retweeted_status. Notice the text does not contain "RT".

提交回复
热议问题