如何使用Facebook Graph API点击facebook POST?

时间:2014-10-09 09:54:20

标签: javascript html facebook api facebook-graph-api

我目前正在使用Facebook Graph API来喜欢Facebook中的帖子。 如https://developers.facebook.com/docs/graph-api/reference/v2.1/object/likes中所述 这是我的代码:

FB.api(
"/{object-id}/likes",
"POST",
function (response) {
  if (response && !response.error) {
    /* handle the result */
  }
}

);

我有publish_actions权限,我也有用户令牌,但错误是

FB.__globalCallbacks.f151265214({"error":{"message":"(#200) Permissions error","type":"OAuthException","code":200}});

有人可以帮忙吗?现在有点绝望。谢谢。

1 个答案:

答案 0 :(得分:0)

好像您在登录应用时没有收集publish_actions权限。

您需要此权限才能发布特定用户的对象。