0
votes

I'm trying to get the number of likes for each comment reply from the graph API.

Given this JSON-reply from a thread http://graph.facebook.com/10150790362005844_23680728, I can't seem to find the correct id to use in order to get number of likes on each comment.

E.g. https://graph.facebook.com/10150791016840844 returns false.

I did some experimenting with the facebook-comments, and found out that the correct id should be *grap-link*10150790374830844_23680907, but I can't find a way to locate this id through regular means in the Graph API...

1

1 Answers

0
votes

This is an interesting one. This ID is the id for a comment. You can see this by looking at the type field here: http://graph.facebook.com/10150790362005844_23680728?metadata=1

To get the like counts for the comment replies, you're going to have to drill UP to find the post_id that this comment was originally attached to, then query for /POST_ID/comments, which will give you the like count.

If you can't find the comment otherwise, You're going to have to page through /user/feed until you find the post showing this comment was created and get the post_id from there.