FB API 点赞页面

FB API Get like of page

我正在尝试检查用户是否喜欢 Facebook 页面。我请求 user_likes 权限,我检查了它并 returns 该权限。所以我想我的权限没问题。

然后我运行函数getInfo。如果我使用“/me/likes/”,我会得到用户的所有喜欢。但我想特别检查 1 页。我做错了什么?

function getInfo(){
    FB.api(
        "/me/likes/id/",
        function (response) {
          if (response && !response.error) {
            /* handle the result */
           console.log(response);
          }
        }
    );  
}

您需要更换

FB.api(
        "/me/likes/page-id",
        ...

具有像这样的实际页面 ID 的代码(对于 CocaCola 页面):

FB.api(
        "/me/likes/40796308305",
        ...