davidchua / pymessenger

A Python Wrapper for the FB Messenger Bot API (Send/Receive API)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use send_button_message?

sajalkatare opened this issue · comments

How I can use send_button_message function, can you please provide an example:

The format for different button types can be found here: https://developers.facebook.com/docs/messenger-platform/send-messages/buttons/

Here's an example of how I used the URL button:

url_button = [
                {
                  "type": "web_url",
                  "url": [INSERT URL HERE],
                  "title": [DISPLAY TEXT FOR BUTTON],
                }
]
            
bot.send_button_message(sender_id, "message to send with button", url_button)