简体   繁体   English

在单个请求中从多个 twitter 用户获取用户信息?

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

I have stored the login information from twitter users (eg access- tokens) in my database.我已将 twitter 用户的登录信息(例如访问令牌)存储在我的数据库中。 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...).否则,如果我的数据库中有 1000 个用户,我必须发送 1000 个请求(我猜这会导致列入黑名单......)。

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顺便说一句:我正在使用 Google App Engine 和 twitter4j

Thanks so far感谢到目前为止

The API method you are looking for is GET users/lookup .您正在寻找的 API 方法是GET users/lookup It will allow you to get up to 100 user objects in a single request.它将允许您在单个请求中获取多达 100 个用户对象。

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 .要计算用户转发其状态的次数,您的赌注是使用GET statuses/user_timeline You can include a count of 200 parameter that will return up to 200 statues in a single method.您可以包含一个count200的参数,该参数将在一个方法中返回多达 200 个雕像。 Each status object contains a retweet_count value that is generally pretty accurate.每个状态 object 都包含一个通常非常准确的retweet_count值。 You will have to add all of those numbers together.您必须将所有这些数字加在一起。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM