Quick Replies allow you to get message recipient input by sending buttons in a message. When a quick reply is tapped, the value of the button is sent in the conversation, and the Messenger Platform sends a messages
event to your webhook. Quick replies are a message type sent with the Send API. For complete details on sending messages, see Messages.
For complete usage details, see Quick Replies.
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/v21.0
/me/messages?access_token={PAGE_ACCESS_TOKEN}"
{ "recipient_id": "1254477777772919", "message_id": "AG5Hz2Uq7tuwNEhXfYYKj8mJEM_QPpz5jdCK48PnKAjSdjfipqxqMvK8ma6AC8fplwlqLP_5cgXIbu7I3rBN0P" }
Property | Type | Description |
---|---|---|
| String | Non-empty message text to send with the quick replies. |
| Object | An attachment to send with the quick replies. |
| Array< | An array of objects the describe the quick reply buttons to send. A maximum of 13 quick replies are supported. |
quick_reply
Property | Type | Description |
---|---|---|
| String | Must be one of the following
|
| String | Required if |
| String, Number | Required if May be set to an empty string if |
| String | Optional. URL of image to display on the quick reply button for text quick replies. Image should be a minimum of 24px x 24px. Larger images will be automatically cropped and resized. Required if |