Mathias Edblom
Mathias Edblom

Reputation: 1

Post Likes via Graph API

The Graph API doesn't work and I get error code 100 when post /ID/likes with no parameters like the documentation says.

Can anybody help me? Is this even possible to do as the documentation say? If I try the Graph API Explorer I get the same error.

http://developers.facebook.com/tools/explorer

Upvotes: 0

Views: 211

Answers (2)

Needhi Agrawal
Needhi Agrawal

Reputation: 1326

You can like a Post by issuing a HTTP POST request to the POST_ID/likes connection with the publish_stream permission. No parameters necessary.

If the write is successful, you get the following return.

Description         Type
If the like succeeded   boolean

Upvotes: 0

phwd
phwd

Reputation: 19995

The likes connection is for GET requests only

All the pages this user has liked.

You cannot use it to post likes.

You can read the pages that a User has liked by issuing an HTTP GET to /PROFILE_ID/likes with the user_likes or friends_likes permissions.

Read more at http://developers.facebook.com/docs/reference/api/user/#likes

Upvotes: 1

Related Questions