我正在使用Twitter4j庫,我試圖獲取已驗證用戶的關注者列表。使用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]));
}
雖然這工作,它遠遠不是有效的,因爲它發出的每個跟隨一個請求。除了這種方法的緩慢,我最終得到了以下錯誤:
error - Rate limit exceeded. Clients may not make more than 350 requests per hour.
任何人都知道什麼更好的方法來做到這一點? (我在documentation上花了一些時間,但找不到任何)。
謝謝!