3

根据 Messenger Platform 1.4 的文档,上传 API 返回上传附件的 attachment_id:

{
   "attachment_id":"1854626884821032"
}

我们如何使用这个 attachment_id 发送附件?还是简单地从同一 URL 发送带有附件的另一条消息会导致信使使用上传的附件?

4

1 回答 1

0

你应该使用

$imageAttachment = array('type' => 'image'``, 'payload' =>   array('attachment_id' =>  '1854626884821032'));

$params = array('message' => array('attachment' => $imageAttachment), "recipient" => array("id" => $senderId));

并按照此处指定的方式制作卷曲

https://developers.facebook.com/docs/messenger-platform/send-api-reference/image-attachment

于 2017-06-26T17:52:15.827 回答