2014-12-04 172 views

回答

0

这是你如何使用FB.api

FB.api('/', 'post', { 
    id: 'url-to-scrape', 
    scrape: true 
}, function (response) { 
    console.log(response); 
}); 

不知道你在哪里得到了上面的示例代码,但你应该总是看看Facebook的文档。

0

我得到无效的令牌意味着您的令牌不正确让我告诉您如何生成令牌,只需将您的应用ID和在Facebook开发者应用程序仪表板中获取的应用秘密合并后,您已签署check here and read url并检查错误在你的代码的API更快,下载后的人在这里www.getpostman.com,放于在地址栏的API调用代码,然后点击发送它会告诉你你的错误。然后获得令牌对于Facebook fancount,中,pageid,likescount,你可以在谷歌更多的信息做graph.facebook.com搜索。如果有问题请联系我。

 $appid = "xxxxxxxxxxxxxxx"; 
     $appsecret = "yyyyyyyyyyyyyyyyyyyyyyyyy"; 
    //get it from your dashboard 
     $token = $appid .|. $appsecret key