Mat*_*rry 5 facebook attachment messenger facebook-send-api
Following is the payload for generic template. How to give attachment ID instead of image URL.
Run Code Online (Sandbox Code Playgroud)
https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic#payload显示如何提供通用模板 POST 请求和https://developers.facebook.com/docs/messenger-platform/ send-messages#attachment_reuse展示了如何使用保存的资源进行发送。如何在通用模板中将它们组合起来
{
"recipient":
{
"id":"psid"
},
"message":
{
"attachment":
{
"type":"template",
"payload":
{
"template_type":"generic",
"elements":
[
{
"title":"Welcome to PeterHats",
"image_url":"https://i.ytimg.com/vi/EGpy98wrHDo/hqdefault.jpg",
"subtitle":"Actor \n Director",
"default_action":
{
"type": "web_url",
"url": "https://www.google.co.in",
"messenger_extensions": true,
"webview_height_ratio": "tall",
"fallback_url": "https://www.facebook.com/"
}
}
]
}
}
}
Run Code Online (Sandbox Code Playgroud)
}
| 归档时间: |
|
| 查看次数: |
486 次 |
| 最近记录: |