When the postback button is tapped, the Messenger Platform sends an event to your postback webhook. This is useful when you want to invoke an action in your bot. This button can be used with the Button Template and Generic Template.
For more information on using the postback button, see Postback Button.
When the postback button is tapped, the Messenger Platform sends an event to your postback webhook. This is useful when you want to invoke an action in your bot. This button can be used with the Button Template and Generic Template.
For more information on using the postback button, see Postback Button.
{
"type":"postback",
"title":"<BUTTON_TEXT>",
"payload":"<DEVELOPER_DEFINED_PAYLOAD>"
}
curl -X POST -H "Content-Type: application/json" -d '{
"recipient":{
"id":"<PSID>"
},
"message":{
"attachment":{
"type":"template",
"payload":{
"template_type":"button",
"text":"Try the postback button!",
"buttons":[
{
"type":"postback",
"title":"Postback Button",
"payload":"DEVELOPER_DEFINED_PAYLOAD"
}
]
}
}
}
}' "https://graph.facebook.com/v21.0
/me/messages?access_token=<PAGE_ACCESS_TOKEN>"
c:curl>
{ "recipient_id": "1254477777772919", "message_id": "AG5Hz2Uq7tuwNEhXfYYKj8mJEM_QPpz5jdCK48PnKAjSdjfipqxqMvK8ma6AC8fplwlqLP_5cgXIbu7I3rBN0P" }
Property | Type | Description |
---|---|---|
| String | Type of button. Must be |
| String | Button title. 20 character limit. |
| String | This data will be sent back to your webhook. 1000 character limit. |