Romain Achard
Romain Achard

Reputation: 83

Is it possible to have a dynamic payload value in a Messenger button?

I'm struggling with a payload issue on a Facebook messenger bot. How to pass a parameter in the payload. I simply want to stock an info before launching a webview on a button. But my postback can't interpret the dynamic payload. I read that some people are using m.me links with parameters but i sounds weird that you can't pass parameters with m.me links. Any idea.

Upvotes: 1

Views: 401

Answers (1)

amuramoto
amuramoto

Reputation: 2848

Putting this answer from comment thread here if anyone needs it:

You can set the payload of the button dynamically when you define the button, but the payload only accepts a string, so you can stringify the object to set the payload, then parse it when the payload is received.

Upvotes: 3

Related Questions