开发者

Getting user-information from multiple twitter users in a single request?

I have stored the login information from twitter users (e.g. access- tokens) in my database. I now want to get the retweet-count of all these users in a single request.

Otherwise I have to send 1000 requests if I have 1000 users in my database (which would lead to blacklisting I guess.开发者_运维技巧..).

Is there a comon way to get information from multiple users without sending requests for each user?

BTW: I'm using Google App Engine and twitter4j

Thanks so far


The API method you are looking for is GET users/lookup. It will allow you to get up to 100 user objects in a single request.

To get a count of the number of times a user has had a status of theirs retweeted your bets bet is to use GET statuses/user_timeline. You can include a count of 200 parameter that will return up to 200 statues in a single method. Each status object contains a retweet_count value that is generally pretty accurate. You will have to add all of those numbers together.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜