0
votes

Hi i see that Facebook Graph API not returing all comments of posts for a page.it shows all posts of a page well but it not showing all comments for each post.it showing last two comments only!!. but for some other pages shows all comments.so don't why the problem is for some pages? is this a facebook bug? or please suggest if i am wrong.i used the access token of a app with read_stream premission.i don't want to use other permissions coz it's a security risk.

please reply

thanks

1
Increase you LIMIT value, such as LIMIT=150. Facebook API return based on limit value first, then filter by some conditions like is_privacy. So it's make sense when only two comments.Fruit
nope i did use like "..feed?limit=150&access_token=.." but each post which have many comments, shows only last 2 comments though count value is more than 2 i saw by graph api explorer.limit is actually for limiting posts i guess not post comments.dev_hero
I see. If you query graph.facebook.com/USERID OR PAGEID/feed? It's by design only a few comments is return. This comments is deprecated, you can read more on developers.facebook.com/blog/post/2013/04/03/…, find this line "'comments' field from 'stream' FQL table is deprecated. Please use the'comment_info' column to fetch the 'can_comment' and 'comment_count' fields."Fruit
You should use fql instead. Kindly check it out on developers.facebook.com/docs/technical-guides/fqlFruit
well let us make it easy.'comments' field in fql table is deprecated but if try get comments using graph api "graph.facebook.com/POSTID/comments?access_token=.." is that ok? also i tried using fql query to get comments-"SELECT id, fromid, time, text, likes FROM comment WHERE object_id=id_value ORDER BY time" but i don't see commenter name(but have fromid) in comment table? i need to show commenter name how if i must use fql query ?dev_hero

1 Answers

1
votes

its because commentor privacy settings. if user turn it off, you can't request the comments via API. when you do testing on facebook graph api:

postid/?fields=comments.summary(true)

you will see the debug info:

total_count represents the approximate number of nodes on the comments edge. The actual number of results returned might be different depending on privacy settings.

you can also refer to this related question: facebook graph api returns not all the comments