Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Page page = facebookClient.fetchObject("lockheedmartin", Page.class);
- System.out.println(page.getIsVerified());
- System.out.println("bio: "+page.getCategory());
- int totalResults = 0;
- Connection<Post> pageFeed = facebookClient.fetchConnection(page.getId() + "/feed", Post.class,Parameter.with("limit", 20));
- for (List<Post> feed : pageFeed) {
- totalResults = totalResults + feed.size();
- for (Post post : feed) {
- com.restfb.types.Post.Comments comments = post.getComments();
- if(comments !=null){
- List<Comment> commentList = comments.getData();
- for(Comment comment : commentList){
- System.out.println(comment.getMessage());
- }
- }
- }
- }
- Page page = facebookClient.fetchObject("lockheedmartin", Page.class);
- int totalResults = 0;
- Connection<Post> pageFeed = facebookClient.fetchConnection(page.getId() + "/feed", Post.class,Parameter.with("limit", 20));
- for (List<Post> feed : pageFeed) {
- totalResults = totalResults + feed.size();
- for (Post post : feed) {
- Connection<Comment> comments = facebookClient.fetchConnection(post.getId()+ "/comments", Comment.class);
- if(comments !=null){
- List<Comment> commentList = comments.getData();
- for(Comment comment : commentList){
- System.out.println(comment.getMessage());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement