简体   繁体   English

即使我具有身份验证,Facebook JS API上的权限错误也无法发表评论

[英]Permissions error on Facebook JS API for comments, even though I have the auths

I am attempting to POST a comment with the FB JS API. 我正在尝试使用FB JS API发表评论。

FB.api("/" + myFBPageId + "/comments", "post", {
  "fb:explicitly_share": true
  "message": contents
}, function(response) { console.log(response) })

Unfortunately, even though I have the both publish_actions and publish_stream permissions, I get this exception: 不幸的是,即使我同时拥有publish_actions和publish_stream权限,我也会收到此异常:

"message":"(#200) Permissions error","type":"OAuthException","code":200

Um, what? 嗯什么? Why? 为什么? I have tested and I am authed with FB on the site. 我已经测试过,并且在该网站上获得FB的身份验证。 I just double checked with this: 我只是仔细检查了一下:

FB.login(function(response) {
  console.log(response);
}, {scope: 'publish_stream'});

So my question is, what is the permissions error here? 所以我的问题是,这里的权限错误是什么? How do I fix it? 我如何解决它?

I am attempting to POST a comment 我正在尝试发布评论

you are just giving the page id. 您只是提供页面ID。 How would the facebook know that to which feed, it should comment? Facebook如何知道应该对哪个提要进行评论? So, you should provide facebook the feed-id instead of the page where you wan t tp post a comment. 因此,您应该为facebook提供提要ID,而不是在您想要发表评论的页面上提供。 Here's the correct syntax if you want to post comment on a feed : 如果您要在Feed上发表评论,则以下是正确的语法:

/POST_ID/comments , instead of /PAGE_ID/comments /POST_ID/comments ,而不是/PAGE_ID/comments


And, if you meant to post a feed instead of a comment, you should use- 而且,如果您打算发布供稿而不是评论,则应使用-

/PAGE_ID/feed

暂无
暂无

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

相关问题 使用redmine API进行POST请求时出现401错误,即使我已经包含了api密钥 - Getting 401 error when using redmine API for a POST request even though I have included the api key 我在 firebase 中收到缺少权限错误,即使我允许它读取 - I get a missing permissions error in firebase even though I allow it to read 为什么即使将window.onload放在HTML后面,我的JS也只能正常工作? - Why is my JS only working if I put it after the HTML, even though I have a window.onload? 无法读取推送未定义的属性? 即使我将评论推送到评论数组,为什么我会收到此错误? - Cannot read property of push undefined? Even though I am pushing comment to comments array why am I receiving this error? 即使我有一个数组,map 也不是 function - map is not a function even though I have an array 为什么 api 响应两次,即使我使用 XMLHttpRequest 在 JavaScript 中调用了一次? - Why does the api responds twice even though I have called once in JavaScript using XMLHttpRequest? 即使我加载了 js,方法也未定义 - Method undefined even though I loaded the js 即使我拥有正确的身份验证密钥,Google 地图 API 也没有显示我的地图 - Google map API is not displaying my map even though I have the correct authentication key 即使只有一个参数,我也会收到“包装的保证不是可迭代的错误” - I'm getting a 'Wrapped promise not iterable error' even though I have only one parameter 即使我的代码中有catch部分,我仍收到未处理的Promise Rejection错误 - I am getting Unhandled Promise Rejection error even though I have the catch section in my code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM