admin管理员组

文章数量:1332889

I am trying to like a post with the JavaScript API, like this (id is the post ID):

FB.api('/'+id+'/likes', 'post');

For example, FB.api('/55353596297_10150952824706298/likes', 'post');

This returns "(#3) Application does not have the capability to make this API call".

I am trying to like a post with the JavaScript API, like this (id is the post ID):

FB.api('/'+id+'/likes', 'post');

For example, FB.api('/55353596297_10150952824706298/likes', 'post');

This returns "(#3) Application does not have the capability to make this API call".

Share Improve this question asked Jul 6, 2012 at 13:54 user1217055user1217055 911 gold badge1 silver badge5 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 2

Ensure that you have the permissions to affect this. Most applications simply have the PUBLISH capability (feed) and basic permissions.

Now, if you're asking to retrieve the Likes for a given pool of users, aim to use:

FB.api("/likes?ids=55353596297,55353596298")

For retrieving multiple user interests.

Your app needs the publish_actions permission. My code:

FB.api(
    '131389306871851_642563079087802/likes',
    'post',
    {access_token:yourTokenHere}, // from authResponse.accessToken
    function(r) {
        console.log(r)            // Prints "true"
    }
);

本文标签: facebook(3) Application does not have the capability to make this API call JavaScript SDKStack Overflow