# Add more than 3 buttons in facebook messenger

**URL:** <https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113>\
**Category:** Rasa Open Source\
**Created:** [October 21, 2019, 11:58am UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113 "2019-10-21T11:58:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![yodin9](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yodin9](https://forum.rasa.com/u/yodin9)\
**Post date:** [October 21, 2019, 11:58am UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/1 "2019-10-21T11:58:10Z")

</div>

Facebook messenger is only displaying 3 buttons, more than 3 buttons is being ignored by facebook messenger how can i display more than 3 buttons in facebook messenger???

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [October 24, 2019, 11:34am UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/2 "2019-10-24T11:34:49Z")

</div>

Do you receieve a logger warning? This is a constraint from facebook, not rasa: [rasa/facebook.py at master · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/blob/master/rasa/core/channels/facebook.py#L170-L174)

---

<div class="post-metadata">

**Author:** ![yodin9](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yodin9](https://forum.rasa.com/u/yodin9)\
**Post date:** [October 24, 2019, 3:53pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/3 "2019-10-24T15:53:51Z")

</div>

@erohmensing yes i receieve a logger warning

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [October 25, 2019, 7:33am UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/4 "2019-10-25T07:33:26Z")

</div>

Right, so you can’t display more than 3 buttons, as it says. Facebook’s API won’t let you.

---

<div class="post-metadata">

**Author:** ![ryanmark](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ryanmark/32/4770_2.png) [@ryanmark](https://forum.rasa.com/u/ryanmark)\
**Post date:** [December 14, 2019, 6:38pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/5 "2019-12-14T18:38:24Z")

</div>

If you can live with the limitations of quick responses (mostly that all the buttons disappear as soon as one is clicked), you can have up to 13 quick responses buttons - the following is an example code snippet from Python custom actions.

`Preformatted text` message5 = {

```
                  "text": "What do you want next?",
                  "quick_replies": [
                    {
                      "content_type": "text",
                      "payload": mess4_payload_plot,
                      "title": " ",
                      "image_url":"https://github.com/ryanmark1867/chatbot/raw/master/images/thumb_up.jpg"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_stars,
                      "title": " ",
                      "image_url":"https://github.com/ryanmark1867/chatbot/raw/master/images/thumb_down.jpg"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_director,
                      "title": "click to get *director*"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_plot,
                      "title": "click to get *plot2*"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_stars,
                      "title": "click to get stars2"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_director,
                      "title": "click to get director2"
                    },
                    {
                       "content_type": "text",
                      "payload": mess4_payload_plot,
                      "title": "click to get plot3"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_stars,
                      "title": "click to get stars3"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_director,
                      "title": "click to get director3"
                    },
                    {
                       "content_type": "text",
                      "payload": mess4_payload_plot,
                      "title": "click to get plot4"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_stars,
                      "title": "click to get stars4"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_director,
                      "title": "click to get director4"
                    },
                    {
                      "content_type": "text",
                      "payload": mess4_payload_rating,
                      "title": "click to get rating"
                    }
                  ]
                }

```

`Preformatted text`dispatcher.utter\_custom\_json(message5)

result looks like this:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/40d0ba7bcf2563e60ff2e38a8c2aa9a8ee98fe74.jpeg)

---

<div class="post-metadata">

**Author:** ![amina\_anvar](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@amina\_anvar](https://forum.rasa.com/u/amina_anvar)\
**Post date:** [April 22, 2020, 7:05pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/6 "2020-04-22T19:05:17Z")

</div>

can we change the number from 3 to 13 something like that?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [April 22, 2020, 7:18pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/7 "2020-04-22T19:18:49Z")

</div>

You can have up to 3 buttons or up to 13 quick respones.

---

<div class="post-metadata">

**Author:** ![shivam\_soniii](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@shivam\_soniii](https://forum.rasa.com/u/shivam_soniii)\
**Post date:** [September 28, 2021, 7:51pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/8 "2021-09-28T19:51:28Z")

</div>

I tried this but can’t see any response in the chat. What could be the issue?

---

<div class="post-metadata">

**Author:** ![ryanmark](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ryanmark/32/4770_2.png) [@ryanmark](https://forum.rasa.com/u/ryanmark)\
**Post date:** [September 30, 2021, 2:47am UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/9 "2021-09-30T02:47:50Z")

</div>

Hi @shivam_soniii - assuming you are using Facebook Messenger as the client, there are a number of things that can go wrong rendering a Rasa chatbot in that client. This article covers some of the possible issues - [https://markryan-69718.medium.com/tips-for-using-rasa-chatbots-with-facebook-messenger-ee631e67e30b](https://markryan-69718.medium.com/tips-for-using-rasa-chatbots-with-facebook-messenger-ee631e67e30b) - but keep in mind that there have been changes on the Rasa and Facebook sides since that article was written, so new issues may have been introduced in addition to what is described in the article.

---

<div class="post-metadata">

**Author:** ![shivam\_soniii](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@shivam\_soniii](https://forum.rasa.com/u/shivam_soniii)\
**Post date:** [September 30, 2021, 7:46pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/12 "2021-09-30T19:46:29Z")

</div>

Thanks, the issue is resolved. Can you please guide me how can I make it dynamic? I want to pass dynamic payload and title through actions instead of writing so many static quick replies. Is there any way I can achieve this?

---

<div class="post-metadata">

**Author:** ![ryanmark](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ryanmark/32/4770_2.png) [@ryanmark](https://forum.rasa.com/u/ryanmark)\
**Post date:** [October 2, 2021, 6:50pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/13 "2021-10-02T18:50:18Z")

</div>

Hi - if you want to have full control over what is displayed in Messenger (beyond the limited controls that Facebook offers, like quick responses and carousels), then you can try to use webview. This allows you to display an HTML page (with some limitations) in the context of Messenger. This article [Using Facebook Messenger Webview with a Rasa chatbot | by Mark Ryan | The Startup | Medium](https://medium.com/swlh/using-facebook-messenger-webview-with-a-rasa-chatbot-67b43af3324a) describes an end-to-end example of a Rasa chatbot that uses webview to display content in Messenger. The article links to a repo with the code for the example described in the article: [GitHub - ryanmark1867/webview\_rasa\_example: example of using Rasa with Facebook Messenger webview](https://github.com/ryanmark1867/webview_rasa_example). Some cautions (1) I haven’t run this code for over a year, so there may be regressions in the Rasa or Facebook platforms that were introduced since I last ran it, (2) you need to get the for-pay subscription to ngrok for this implementation to work - I wasn’t able to find an alternative that provided the https URLs that Facebook insists on (3) even this “hello world” example is not simple - see the diagram in the middle of the article

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/a/9/a9c8defeda29e22c0433fb1ebed9ade0735b96c1.jpeg)

---

<div class="post-metadata">

**Author:** ![shivam\_soniii](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@shivam\_soniii](https://forum.rasa.com/u/shivam_soniii)\
**Post date:** [October 4, 2021, 4:23pm UTC](https://forum.rasa.com/t/add-more-than-3-buttons-in-facebook-messenger/20113/14 "2021-10-04T16:23:18Z")

</div>

Thank you for the suggestion. I’ll look into it.
