簡體   English   中英

我無法在Facebook Android SDK中使用Likes graph API

[英]i can't use the likes graph api with the facebook android sdk

我想在我的Facebook頁面中添加一個贊,但是失敗了,代碼是:

Bundle par = new Bundle();  
par.putString("access_token", ACCESS_TOKEN); 
par.putString("format", "json");
facebook.request("72447883975/likes", par, "POST");

響應為“(#3)應用程序沒有進行此API調用的能力”。 有人知道此呼叫需要哪個權限嗎? 謝謝!

您需要“ publish_stream”來發布評論/新聞,同時將用戶登錄到Facebook,如下所示。

https://graph.facebook.com/oauth/authorize?client_id=" + <your app is>  + 
                "&redirect_uri=" +<redirect uri>
                "/connect" +
                "/login_success.html/" +
                "&scope=offline_access,publish_stream,read_stream" +
                "&display=touch&type=user_agent"

我上次檢查時,無法通過API喜歡某些對象(頁面)。 也許情況已經改變,但是您可能需要為此使用opengraph API。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM