claudiajs / claudia-bot-builder

Create chat bots for Facebook Messenger, Slack, Amazon Alexa, Skype, Telegram, Viber, Line, GroupMe, Kik and Twilio and deploy to AWS Lambda in minutes
https://claudiajs.com/claudia-bot-builder.html
MIT License
1.84k stars 253 forks source link

Facebook generic template button value not working .. #114

Closed ajith007 closed 6 years ago

ajith007 commented 6 years ago

The below code displays the button correctly in Facebook Messenger, but upon clicking the button, it sends 'Say Hello' instead of 'hello'.

let sayhello = new fbTemplate.Generic();
sayhello.addBubble('Hello');
sayhello.addButton('Say Hello','hello');

* Expected behaviour: Clicking the 'Say Hello' button should send the button value, 'hello' as the postback

* What actually happens: Upon clicking the button it sends the button title/caption, 'Say Hello' as the postback.

* Which bot engine (facebook, skype...): Facebook Messenger

* Steps to reproduce the problem: Try the above code snippet in a Messenger bot.

ajith007 commented 6 years ago

I missed to add messaging_postbacks webhook earlier. Postback is working now but it's still sending 'Say Hello' instead of 'hello'.

ajith007 commented 6 years ago

Looks like that's by the design. My bad! :(