【发布时间】:2011-12-28 17:33:02
【问题描述】:
我正在使用Twitter4j 库,我正在尝试获取经过身份验证的用户的关注者列表。
我正在做以下事情:
IDs followersIds = mTwitter.getFollowersIDs(-1);
long [] ids = followersIds.getIDs();
List<User> followers = new ArrayList<User>();
for(int i = 0; i < ids.length; i++) {
followers.add(mTwitter.showUser(ids[i]));
}
虽然这可能有效,但它远非有效,因为它会为每个追随者发送一个请求。除了这种方法的缓慢之外,我最终得到以下错误:
错误 - 超出速率限制。客户的收入不得超过 350 每小时请求数。
谁知道更好的方法来做到这一点? (我在documentation 上花了一些时间,但找不到任何东西)。
谢谢!
【问题讨论】: