Use @Action
What is an action? It is a string of characters sent to the script, formed as follows:
action?nameAction=value
For example, we can use them if we want [create a persistent menu on Facebook Messenger] (https://developers.facebook.com/docs/messenger-platform/send-messages/persistent-menu), the JSON will be the following :
When the user clicks the Main Menu
button, an action?menu
message will be sent to the script, of course invisible to the user.
Action Decorator
To start a function in the script, let's use the decorator @Action()
:
If a value is sent
For example, with action?menu=game
, we can use the magic variable action
Last updated