{
"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/v2.6/me/messages?access_token=<PAGE_ACCESS_TOKEN>"
{ "recipient_id": "1254477777772919", "message_id": "AG5Hz2Uq7tuwNEhXfYYKj8mJEM_QPpz5jdCK48PnKAjSdjfipqxqMvK8ma6AC8fplwlqLP_5cgXIbu7I3rBN0P" }
속성 | 유형 | 설명 |
---|---|---|
| 문자열 | 버튼의 유형입니다. |
| 문자열 | 버튼 제목입니다. 20자로 제한됩니다. |
| 문자열 | 데이터는 개발자의 Webhook에 다시 전송됩니다. 1,000자로 제한됩니다. |