我可以访问 Facebook 公开帖子并获取它们。但我无法得到他们的评论。这是我的代码的一部分:
facebook.setOAuthAppId("1**********", "S*** S***");
facebook.setOAuthAccessToken(new AccessToken("bla bla bla", null));
try{
int counter=0;
ResponseList<Post> results = facebook.searchPosts("galatasaray", new Reading().limit(100));
for(Post post : results){
System.out.println();
// PagableList<Comment> comments=post.getComments();
// for(Comment comment : comments){
// System.out.println(comment.getMessage());
// }
counter++;
System.out.println("NAME:-->>>" + post.getName());
System.out.println("DATE:-->>>" + post.getCreatedTime());
System.out.println("MESSAGE:-->>>" + post.getMessage());
System.out.println("NAME2:-->>>" + post.getFrom().getName());
System.out.println("URL--->>>"+post.getLink());
System.out.println("COUNT:-->>>" + counter);
System.out.println("ID-------->>>"+post.getId());
System.out.println("Comments----->>> ");
System.out.println("-----------------------------------------------------------");