Reputation: 5147
In July 2013 Facebook removed the comment count from posts in the graph API. Is there an alternative, currently working way to retrieve the number of comments for a specific post, without having to download all of them? Thanks.
Upvotes: 1
Views: 5267
Reputation: 76
FQL is deprecated so you should use the Graph API via https://developers.facebook.com/docs/graph-api/reference/v2.2/object/comments
Upvotes: 0
Reputation: 111
You can also do this with the Graph API, by appending /comments?summary=true
to the request.
The return object has a summary field all the way at the end (scroll to the bottom to see it in the Graph API explorer). Within the summary there's a total_count
field.
Upvotes: 1
Reputation: 883
Well i don't know your scenario, so can't help you with exact solution. but one way to get comments count is getting it from the stream table using FQL.
there is a structure of comment_info which gives the comment count for any specific post.
see the query below for example:
Select type, post_id, description, likes,comment_info from stream WHERE source_id = "*post_id*"
put the post id in the clause.
Upvotes: 2