gpt4 book ai didi

Facebook 发送权限

转载 作者:行者123 更新时间:2023-12-02 21:48:30 54 4
gpt4 key购买 nike

只是想了解权限是如何工作的。我通过 API 从页面(我是管理员)向自己发送一条消息:

POST https://graph.facebook.com/v2.8/_page_id_/
{
"recipient": {
"id": "_my_id_"
},
"message": {
"text": "hello, world!"
}
}

接收:

{
"error": {
"message": "(#230) Requires pages_messaging permission to manage the object",
"type": "OAuthException",
"code": 230,
"fbtrace_id": "CofCWlt4GXP"
}
}

为什么 Facebook 拒绝我?

UPD1。

我不明白原因是因为:

When your app is in Development Mode, the Send API will only work for admins, developers and testers of the app. After your app is approved and public, it will work for the general public.

在开发模式下我还需要特殊权限吗?

UPD2。

enter image description here

我获得了许可,但仍然不允许通过 API 发送消息:

{
"error": {
"message": "(#230) Requires pages_messaging permission to manage the object",
"type": "OAuthException",
"code": 230,
"fbtrace_id": "GJRxafu1uNx"
}
}

最佳答案

您需要相应的权限。 pages_messaging 权限。

查看此页面以了解有关其工作原理的更多信息。 Pages_messaging permission

This allows you to send and receive messages through a Facebook Page, but only within 24h hours after a user action. For post 24h messages see the next permission. Conversations through this API can only begin when someone indicates—through a Messenger plugin or directly messaging you—that they want to receive messages from you.Try getting a token with that permission from the graph explorer.

之后应该可以工作。

https://developers.facebook.com/tools/explorer/

更新:

是的,您需要特定权限才能执行其中一些操作。他们指的是该应用程序的可用性。当应用程序处于开发模式时,即使是管理员也需要获取具有执行某些操作所需权限的 token 。

关于Facebook 发送权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43039624/

54 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com