I want to fetch the public posts from a user(not page) using restfb. I have added all permission in User Data Permissions and Extended Permissions in Graph API Explorer. Still i am not getting the results.
But i can take the posts from a page using following code:
Page page =facebookClient.fetchObject("https://www.facebook.com/FacebookDevelopers",Page.class);
Connection<Post> pageFeed = facebookClient.fetchConnection(page.getId() + "/feed", Post.class);
while (pageFeed.hasNext()) {
pageFeed = facebookClient.fetchConnectionPage(pageFeed.getNextPageUrl(),Post.class);
for (List<Post> feed : pageFeed){
for (Post post : feed){
System.out.println(post.getMessage());
}
}
}
What should i do to get the posts of a User?