curl -X POST -H "Content-Type: application/json" -d '{
"recipient":{
"id":"<PSID>"
},
"messaging_type": "RESPONSE",
"message":{
"text": "Pick a color:",
"quick_replies":[
{
"content_type":"text",
"title":"Red",
"payload":"<POSTBACK_PAYLOAD>",
"image_url":"http://example.com/img/red.png"
},{
"content_type":"text",
"title":"Green",
"payload":"<POSTBACK_PAYLOAD>",
"image_url":"http://example.com/img/green.png"
}
]
}
}' "https://graph.facebook.com/v19.0
/me/messages?access_token=<PAGE_ACCESS_TOKEN>"
{ "recipient_id": "1254477777772919", "message_id": "AG5Hz2Uq7tuwNEhXfYYKj8mJEM_QPpz5jdCK48PnKAjSdjfipqxqMvK8ma6AC8fplwlqLP_5cgXIbu7I3rBN0P" }
属性 | 类型 | 描述 |
---|---|---|
| 字符串 | 待使用快速回复发送的非空消息文本。必须设置 |
| 对象 | 待使用快速回复发送的附件。必须设置 |
| Array< | 描述待发送快速回复按钮的一个对象数组。最多支持 13 条快速回复消息。 |
quick_reply
属性 | 类型 | 描述 |
---|---|---|
| 字符串 | 必须是以下类型之一
|
| 字符串 | 如果 |
| 字符串,数值 | 如果 如果设置了 |
| 字符串 | 可选。将在文本快速回复按钮上显示的图片的网址。图片大小不低于 24 X 24 像素。如果图片过大,系统会自动进行裁剪并调整大小。 如果 |