postback
Captures a click event that contains one or more payloads configured.
Last updated
Was this helpful?
Captures a click event that contains one or more payloads configured.
Last updated
Was this helpful?
postback(payload=String|Array, &block)
Messenger
Telegram
The example below shows how 3 different click events will be handled:
postback
"get_started"
: Click event on .
postback
"yes"
: Click event on "Of course!" button that has been sent as reply in the previous block.
postback
"no"
: Click event on "Not really 🤷🏻♂️" button that has been sent as reply in the first block.
The postback
block can receive parameters that are sent as part of the payload.
Next we will implement the same example as above, but using parameters:
any_postback
blockCatch any postback
received by a context and returns two parameters payload
and payload_params
.
It is a global method of the framework, it is used to generate a payload with parameters. .
Read more about this in .