Reputation: 477
I want to retrieve all comments of a public Facebook post via my application. My application is a service which uses an application_accesstoken to call the Graph API (so there is no possibility to authenticate from a user's perspective).
I retrieve posts via the 'All public posts' search URL (https://graph.facebook.com/?q=[keywords]&type=posts. This URL only returns a few comments on a returned posts. Most of the times only 2 comments (which are the same you can see on the profile page before clicking 'View all XX comments').
Is there any way to retrieve all of those comments via my application? Calling the URL https://graph.facebook.com/userId_postId/comments?access_token={my_application_accesstoken} returns an empty data set.
According to this question ( Facebook Graph API returns 'false' even though post is public ), this is a bug, because it works for comments on posts by companies / on pages.
Can anyone confirm this? Or does anyone know whether this bug is already solved / have a workaround for this problem?
I hope you can help me out!
Upvotes: 6
Views: 15700
Reputation: 9648
I'm going to have to disagree with @vishal as the REST api is being deprecated by Facebook and as such, it might work now but your app could just stop working at some point. Personally I would take a look at using FQL if you have the post ids and seeing if this works for you.
https://developers.facebook.com/docs/reference/fql/comment/
Upvotes: 0
Reputation: 1
Graph API returns only few comments or no comments for Facebook Post. So, its better to use REST API's stream.getComments method to retrieve all the comments of the post.We only need to pass post_id in url.
Upvotes: 0