2014-12-04 169 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