1

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.

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

You can also do this with the Graph API, by appending /comments?summary=true to the request.

https://developers.facebook.com/tools/explorer/?method=GET&path=10151824665463057%2Fcomments%3Fsummary%3Dtrue

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.

Comments

0

FQL is deprecated so you should use the Graph API via https://developers.facebook.com/docs/graph-api/reference/v2.2/object/comments

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.