2017-03-12 13 views
3

根據文檔的Messenger平臺1.4,上傳API返回上傳附件的attachment_id:如何從新的Upload API使用attachment_id?

{ 
    "attachment_id":"1854626884821032" 
} 

我們如何使用這個attachment_id發送附件?或者只是使用上傳的附件簡單地發送帶有來自相同URL的附件的另一封郵件導致使用者?

回答

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

+0

當你發佈鏈接的支持,請張貼的代碼示例,可以解決這個問題,然後用鏈接備份。 –

相關問題