Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payload paramater in bot.on('postback', (payload, reply, actions)) is null #56

Closed
chris247474 opened this issue Nov 24, 2016 · 1 comment

Comments

@chris247474
Copy link

Hi,

Not sure if its just me, but whenever I listen for a postback, the payload always returns null despite being assigned a value before the postback event triggers.

Whenever I use reply to echo the payload data to the user, I get an error message: Param message[text] must be a UTF-8 encoded string

bot.on('postback', (payload, reply, actions) => { reply({text: payload}, (err, info) => { if(err) { console.log(err.message) throw err } }) })

Unless I'm wrong and the payload object changes from a string before postback to a different object type?

Please advise guys
Thanks!

@chris247474
Copy link
Author

Sorry, my mistake. I took a closer look at the documentation and it was fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant