How do I get the authenticated user's retweeted tweets with API 1.1?


#1

I want to know which of “my” tweets have been retweeted. From the documentation on https://dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline:

“This method will include retweets in the JSON response regardless of whether the include_rts parameter is set.”

I must be missing something, because I cannot get my retweeted tweets to show up. When I look at https://twitter.com/i/connect, they are there as “Foobar McFoosson retweeted you”, so there must be a function to get them.

What do I have to find out which of my tweets have been recently retweeted? (Iterating through the “pages” of the timeline is not an issue.)


#2

That language may be misleading you – the mentions timeline is just about mentions of you, not retweets of your tweets. The only retweets that would potentially ever surface in a mentions timeline are retweets where your account was mentioned in the originating tweet.

The website uses a timeline that is different than the mentions timeline. That timeline is not available in the public API.

Until statuses/retweets_of_me potentially makes its way to API v1.1 (it’s part of API v1), the best way to accomplish this is looping through your own user timeline and using statuses/retweets for each tweet with a non-zero retweet_count.

statuses/retweets_of_me isn’t the same as what you see in the interactions tab either, but it is a simplified short cut to the process I outline above.


#3

Thanks for the clarification. I feared as much.

Your suggestion is the only workaround I could think of, but it is highly impractical (if not completely infeasible because of rate limiting) to go through all of a user’s tweets and get the retweet counts.

In order to find out what tweets were retweeted during a certain period, say the past week or day, you would have to iterate over all tweets and you would have to store the retweet count for every single tweet with a timestamp of when that count was retrieved, correct?

The (reverse) chronological view in https://twitter.com/i/connect is pretty much exactly what we need. Is there a reason for not making this public, even when statuses/retweets_of_me will be dead?