0
votes

I am quite new to facebook chat bot.

https://developers.facebook.com/docs/messenger-platform/send-messages/buttons/

I can define button like this.

{
  "type": "postback",
  "title": "<BUTTON_TEXT>",
  "payload": "<STRING_SENT_TO_WEBHOOK>"
}

I have different payload (E.g For course, student). How can I put ID information inside that button as additional information?

Do I have to define like course_1, course_2, student_5, student_8 in order to send type and ID?

1

1 Answers

0
votes

The payload can contain a string up to 1000 characters, what you pass as payload is up to you. Looking at your example you could use something like "course_1" or a combination like "course_1, student_8".