0
我正在使用twitter4J獲取用戶的朋友時間表,但未返回完整的可用歷史記錄。我知道有分頁限制(每個請求200個,總共3200個,按照the documentation),我很好。我提出如下要求:Twitter朋友時間表未返回完整歷史記錄
private static final int MAX_COUNT = 200;
private List<Status> getAllStatuses(long sinceID) throws TwitterException {
Twitter twitter = new Twitter(username, password);
List<Status> friendsTimelineList = new ArrayList<Status>();
List<Status> tempList;
int page = 0;
do {
page++;
tempList = twitter.getFriendsTimeline(
new Paging(page, MAX_COUNT, sinceID));
if(tempList == null)
break;
friendsTimelineList.addAll(tempList);
} while(true);
return friendsTimelineList;
}
這導致在3頁中只返回423個狀態。任何想法爲什麼這可能會發生?