How to send Quick Replies

Updated 4 hours ago by Karol Jastrzebowski

Quick-replies provide an easy way to present the user with options that can be clicked or tapped. They are similar in function to postback buttons but disappear once the user makes a selection. See Facebook's documentation here.

The JSON format for quick-replies is similar to that of a button array. However, note that the quick_replies node is a child of the facebook node.

{
             "text":"Where do you want to go?",
             "facebook":{
                "quick_replies":[
                   {
                      "content_type":"text",
                      "title":"North?",
                      "payload":"_north"
                   },
                   {
                      "content_type":"text",
                      "title":"South?",
                      "payload":"_south"
                   },
                   {
                      "content_type":"location"
                   }
                ],
                "attachment":{
                   "type":"image",
                   "payload":{
                      "url":"<img src="https://media.giphy.com/media/c20UV66B7zCWA/giphy.gif">"
                   }
                }
             }
          }
          

Quick-replies cannot be displayed on their own and must have an associated question. This can be in the form of an attachment node as seen above or, if it is not present, the content of the text field.


How did we do?