Skip to content

quick reply buttons#45

Open
iamnottheway wants to merge 5 commits intodavidchua:masterfrom
iamnottheway:master
Open

quick reply buttons#45
iamnottheway wants to merge 5 commits intodavidchua:masterfrom
iamnottheway:master

Conversation

@iamnottheway
Copy link

Added quick reply to pymessenger. Creating and passing a payload is not needed to display quick reply buttons. Just passing a tuple containing the button_text and payload text will create the buttons. Now, any number of buttons can be added in quick replies. I've tested it on my bot, works well.
Please test it and let me know if it has any problems.

the format for creating reply_options:
options = ( ["button1","payload1"], ["button2","payload2"], )
example:

from pymessenger.bot import Bot
bot = Bot(<access_token>)
reply_message = "Choose any number"
reply_options = (["one","@one"],["two","@two"])
bot.send_quickreply(recipient_id,reply_message,reply_options)

Thanks!

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

Successfully merging this pull request may close these issues.

1 participant