Search code examples
phpfacebookfacebook-graph-api

Permissions needed to like a comment / picture / story


I would like to do the following (if possible).

  • Like a comment
  • Like a picture

What I have:

Permissions:

publish_stream, user_likes, offline_access

When I try to like a story:

{
    "error": {
      "message": "(#200) Permissions error",
      "type": "OAuthException",
      "code": 200
   }
}

I've tried with a token of another app that I have allowed myself, and it works, but it's not that easy to derive the correct permissions from it.

So; Which permissions do i need to like a comment/img? (if possible the correct name of that permission)

Thanks.


Solution

  • Double check your permissions & code. You only need the publish_stream permission:
    Comments

    You can like a comment by issuing an HTTP POST request to COMMENT_ID/likes with the publish_stream permission. No parameters necessary.

    Status

    You can write to the STATUS_MESSAGE_ID/likes connection to like the status message by issuing an HTTP POST request with the publish_stream permission. No parameters necessary.