Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find the retweet count with Twitter4J?

As the title says, I'm using the Twitter4J API and I cannot seem to find how to count the retweets of a "Tweet" instance.

like image 790
ManAmongHippos Avatar asked Jun 09 '11 16:06

ManAmongHippos


1 Answers

The interface StatusMethodsAsync has a getRetweets() function (as described here) but that only shows the top 100 first retweets of a given tweet. If you know that there are less than 100 retweets this should work. If there are more you have in the interface TwitterStream a stream of all retweets (as described here), but that doesn't seem fully functioning, so I wouldn't know then...

But this could get you on the right track.

like image 116
Maarten Terpstra Avatar answered Oct 24 '22 03:10

Maarten Terpstra