질문에 대답하기에는 너무 늦었는지 확실하지 않습니다.
예. 페이징을 사용하여 항목의 다음 페이지를 가져오고 fetchNext()를 사용하여 페이지에서 항목을 가져와야합니다. 페이지의 끝에 도달하면 null을 반환합니다. 다음은 그 예입니다.
public List<Comment> getComments(Post post) {
List<Comment> fullComments = new ArrayList<>();
try {
// get first few comments using getComments from post
PagableList<Comment> comments = post.getComments();
Paging<Comment> paging;
do {
for (Comment comment: comments)
fullComments.add(comment);
// get next page
// NOTE: somehow few comments will not be included.
// however, this won't affect much on our research
paging = comments.getPaging();
} while ((paging != null) &&
((comments = fb_.fetchNext(paging)) != null));
} catch (FacebookException ex) {
Logger.getLogger(Facebook.class.getName())
.log(Level.SEVERE, null, ex);
}
return fullComments;
}
그러나 (주석에 주석을 넣었습니다.) 주석이 거의 없습니다. 아직 그 원인에 대해서는 잘 모르겠습니다. 번호가 다소 작기 때문에 연구에 영향을 미치지 않을 것입니다.