url:
https://graph.facebook.com/v12.0/me/messages?access_token=EAAEV...
Body:
{
"messaging_type": "RESPONSE",
"recipient": {
"id": "5133402446686246"
},
"message": {
"text": "Hello, i bot with buttons",
"attachment": {
"type": "template",
"payload": {
"template_type": "button",
"text": "Try the postback button!",
"buttons": [
{
"type": "postback",
"title": "Postback Button",
"payload": "DEVELOPER_DEFINED_PAYLOAD"
}
]
}
}
}
}
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "generic",
"elements": [
{
"title": "Welcome!", // обязательно указывать
"buttons": [
{
"type": "postback",
"title": "Start Chatting",
"payload": "DEVELOPER_DEFINED_PAYLOAD"
}
]
}
]
}
}
}