为什么我没有收到 Facebook Messenger webhook 请求中的附件?

Why I do not receive the attachments in the Facebook Messenger webhook request?

自昨天(2020 年 10 月 29 日)以来,我仅在链接到我的应用程序的其中一个页面上遇到此问题,其他页面正常运行:

webhook 从 Facebook 收到的附加消息不包含 attachment 字段。 只有带标签的消息才包含“附件”字段。所有其他(图片、视频、音频等)否

我期望的(作为 facebook 文档)是:

{
  "id": "682498302938465",
  "time": 1518479195594,
  "messaging": [
    {
      "sender": {
        "id": "<PSID>"
      },
      "recipient": {
        "id": "<PAGE_ID>"
      },
      "timestamp": 1518479195308,
      "message": {
        "mid": "mid.$cAAJdkrCd2ORnva8ErFhjGm0X_Q_c",
        "attachments": [
          {
            "type": "<image|video|audio|file>",
            "payload": {
              "url": "<ATTACHMENT_URL>"
            }
          }
        ]
      }
    }
  ]
}

但我只收到:

{
    "object": "page",
    "entry": [
        {
            "id": "119320008135788",
            "time": 1604051633128,
            "messaging": [
                {
                    "sender": {
                        "id": "XXXXXX"
                    },
                    "recipient": {
                        "id": "XXXXXX"
                    },
                    "timestamp": 1604051632953,
                    "message": {
                        "mid": "m_7DRP...."
                    }
                }
            ]
        }
    ]
}

这仅发生在 2020 年 10 月 29 日的一页上

有没有人遇到同样的问题/知道为什么会这样?

Facebook support team确认我的问题,正在调查。

我现在正在使用图 api 求解,使用 mid

获取所需的消息信息
GET /v8.0/{message-id} HTTP/1.1
Host: graph.facebook.com

https://developers.facebook.com/docs/graph-api/reference/v8.0/message

例如


GET 

https://graph.facebook.com/v8.0/' + mid + '?fields=message%2Cfrom%2Csticker%2Ctags%2Cid%2Cattachments.limit(10)%7Bid%2Cimage_data%2Cmime_type%2Cname%2Cfile_url%2Cvideo_data%7D&access_token=XXXXXX