简体   繁体   English

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

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

i want to add a likes in my facebook page, but failed, the codes is: 我想在我的Facebook页面中添加一个赞,但是失败了,代码是:

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

the response is "(#3) Application does not have the capability to make this API call". 响应为“(#3)应用程序没有进行此API调用的能力”。 Does anyone knows which permission need for this call? 有人知道此呼叫需要哪个权限吗? thanks! 谢谢!

You need "publish_stream" to post comments/news while logging the user to the facebook like as below. 您需要“ 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"

last time i checked, it was not possible to like certain objects (pages) via the API. 我上次检查时,无法通过API喜欢某些对象(页面)。 Maybe that has changed, but you might need to use the opengraph API for this. 也许情况已经改变,但是您可能需要为此使用opengraph API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM