adellantado / bot-template-framework

Easy to build bot scenarios and run them on top of Botman
MIT License
17 stars 4 forks source link

Button callback not working #2

Closed prappo closed 4 years ago

prappo commented 4 years ago

I tried the following code for button callback but not working . When the "Learn More" button clicked it show the default fallback message. Can you please show me the proper way to call another block by clicking the button. Thanks.

`

{ "name": "Image Example", "type": "image", "template": "image;Learn More", "content": { "url": "https://beedevs.com/images/android-icon-192x192.png", "text": "Logo Image", "buttons": { "https://beedevs.com/": "Visit Website" } } }, { "name": "Menu Example", "type": "menu", "template": "menu", "content": { "text": "Menu sample", "buttons": [ { "Callback": "Learn More" }, { "https://beedevs.com/": "Visit Website" } ] } }

`

prappo commented 4 years ago

Any help please ?

adellantado commented 4 years ago

All is correct, except for the button "Callback": "Learn More", "Learn More" - button title, "Callback" - phrase which returns as a reply messsage on click. So in "template": "image;Learn More", put this instead "image;Callback"