尝试使用 API 从 Facebook 页面向 Facebook 用户发送消息时出错

问题描述 投票:0回答:1

当我尝试使用 Graph API 从 FB 页面向用户发送消息时。我收到此错误:

{
  "error": {
    "message": "Unsupported post request. Object with ID '100066276464105' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
    "type": "GraphMethodException",
    "code": 100,
    "error_subcode": 33,
    "fbtrace_id": "AkMoCKVHuPHXAT7IQubn6rE"
  }
}

我已经检查了其他文档,发现此问题与我的 Facebook 应用程序缺少权限有关,但我已经有了 “pages_show_list”权限:

enter image description here

“pages_read_engagement”和“pages_read_user_content”:

enter image description here

“pages_manage_ads”:

enter image description here

这是我的图形 API 调用:

enter image description here

有人遇到和我一样的问题吗

更新: 我再试一次,这是我当前遇到的问题 第 1 步:我使用 GET 方法获取我的用户 ID (UID) enter image description here 第 2 步:然后我获取我的 Facebook 页面 ID (PID) enter image description here 步骤 3:然后我使用我的用户将初始消息发送到 facebook 页面,之后我使用 POST 调用发送对初始消息的响应消息。 enter image description here

我哪里出错了?

facebook facebook-graph-api
1个回答
0
投票

这样做的原因是我需要获取我的 PSID 用户。 为此,我需要去

curl -i -X GET "https://graph.facebook.com/LATEST-API-VERSION/PAGE-ID/conversations?fields=participants&access_token=PAGE-ACCESS-TOKEN"

然后响应将是这样的,然后响应中的 Id 将是 PSID 并使用此 PSID 发送消息 enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.