Azat
Azat

Reputation: 3914

Facebook Comment API

According to these docs: https://developers.facebook.com/blog/post/2013/04/03/new-apis-for-comment-replies/ and https://developers.facebook.com/docs/reference/api/Comment/, I should be able to GET comments of a post with {object_i}/comments and replies with {comment_id}/commnets.

The former works, but the latter not.

For example: http://graph.facebook.com/10151655724337952/comments, but not http://graph.facebook.com/10151655724337952_10460030/comments.

Object http://graph.facebook.com/10151655724337952_10460030 is fine.

Original post: https://www.facebook.com/photo.php?fbid=10151655724337952&set=a.114456157951.118433.8062627951&type=1.

What am I missing?

Upvotes: 0

Views: 1077

Answers (2)

Michael Reneer
Michael Reneer

Reputation: 2571

You can get replies by adding the comments field to the {object_id}/comments call, as outlined in the documentation. But as the documentation and @phwd points out:

This call requires the same Permissions as those of the Comment object. It will also have a response of the same structure as the top-level /comments call.

Upvotes: 0

phwd
phwd

Reputation: 19995

The {comment_id}/comments connection needs a valid access token. It's weird (since the parent comment didn't need it) but if you supply an access token you can retrieve the response.

Most likely one more of these calls were to be restricted by access tokens as defined by the documentation. This happens for a few other connections and basically ends up being a contradiction either in the documentation or API response.

(I'll leave this up to Facebook Bug Team to figure out @_@)

Upvotes: 1

Related Questions