The "Your tweets retweeted" page on Twitter shows which of your tweets have been retweeted, but usually it says something like "retweeted by @madeuptwitteraccount and others" is there any way to find out (a) how many people have retweeted a tweet and (b) what their twitter IDs are?
3 Answers
The answers so far will only give you at most 100 retweets. There is an API method that returns up to 100 entries of a cursored collection (so you can page through it to get more), though.
There's more information on the Twitter Developers site at GET statuses/retweeters/ids, though you'll also want to read their page about Using cursors to navigate collections.
Edited to add: That said, the first thread on the Developers site that surfaced in a quick google has @episod, a Twitter employee saying:
You can't likely get to all of them. The data is spread out. Your best bet is to use the REST API to determine many of the users who performed the retweet, but the data will still be constrained.
It's easiest to track retweets as they happen rather than try to find them from the past. Use the Streaming API for that.
Recently Twitter has gone a lot of changes and with the new Twitter website this is not possible. However, I use Timeline Tweets which has a feature to view all your tweets retweeted.
I hope this helps.
-
1
-
If you are willing to do some coding, here is how it would work in java...
package twitone;
import java.util.ArrayList;
import java.util.Map;
import twitone.structure.BaseTwitterClass;
import twitone.structure.TwitApplicationFactory;
import twitter4j.Paging;
import twitter4j.RateLimitStatus;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
public class MyRetweeters extends BaseTwitterClass {
private Twitter twitter;
public MyRetweeters(Twitter twitter) {
this.twitter = twitter;
}
public static void main(String[] args) throws TwitterException {
Twitter twitter = TwitApplicationFactory.getjoereddingtonTwitter();
MyRetweeters unit = new MyRetweeters(twitter);
String temp[] = unit.get();
for (String string : temp) {
System.out.println(string);
}
}
public String[] get() {
ArrayList<String> names = new ArrayList<String>();
try {
for (Status status : twitter.getUserTimeline(new Paging(1, 200))) {
System.out.println(status.getText());
if (status.getText().startsWith("RT")) {
// skip
} else if (status.getRetweetCount() > 0) {
// Because I don't want to breach
// Twitter's rate limits
// okay the below has been added to keep within the rate
// limited.
waitUntilICanMakeAnotherCall();
// end keeping within rate limit code.
for (Status rt : twitter.getRetweets(status.getId())) {
names.add(rt.getUser().getScreenName());
System.out.println("---"+rt.getUser().getScreenName());
}
}
}
} catch (TwitterException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
return names.toArray(new String[names.size()]);
}
/**
* @throws TwitterException
* @throws InterruptedException
*/
protected void waitUntilICanMakeAnotherCall() throws TwitterException, InterruptedException {
{
Map<String, RateLimitStatus> temp = twitter.getRateLimitStatus();
RateLimitStatus temp2 = temp.get("/statuses/retweets/:id");
System.out.println(temp2.getRemaining());
if (temp2.getRemaining() == 0) {
Thread.sleep((temp2.getSecondsUntilReset() + 5) * 1000);
return;
}
System.out.println(temp2.getSecondsUntilReset());
int secondstosleep =1+ temp2.getSecondsUntilReset() / temp2.getRemaining();
System.out.println(secondstosleep);
Thread.sleep(secondstosleep * 1000);
}
}
}
This code will print out every tweet you've made recently, along with the IDs of the people who retweeted it. A couple of quick things to note - mostly that this line:
Twitter twitter = TwitApplicationFactory.getjoereddingtonTwitter();
Won't work for you - that's me getting my own API key and so on, you'll have to write your own...