Buttons to external url in custom action and domain.yml for Facebook Messenger

How can I create a button which sends the user to an external url? (url is whitelisted in messenger-platform)

I have tried to use this in custom actions:

buttons = [
    Button(type="web_url", title="URL Title", url="<URL>")

and this:

buttons = [{
    "title":"URL Title", 

with both: dispatcher.utter_button_message(response, buttons) and dispatcher.utter_button_template(response, buttons, tracker)

The bot didn’t write anything in messenger when using url instead of payload

The same goes for this in domain.yml:

- text: "Message"
     - title: "URL Title"
       url: "<URL>"

Is there something I’m missing?

1 Like

I have the same problem. Does anyone have a suggestions on how to fix this?

Hey, kindly share the solution if you have figured out.

I have the same problem. Please suggest a solution?

Just stumbled across the same issue. I believe the native facebook channel is not able to handle anything but postback or text buttons because the function ‘_add_postback_info’ is called every time, modifying the button type to ‘postback’.

Anyone already figured out a solution? Otherwise we probably need to extend / modify the facebook channel.

Hi all,

Anybody got the solution

1 Like