Buttons

Buttons can be used in Structure messages. They provide the user with ability to perform a predefined action, such as opening Messenger webview, send a postback message, share a content, and more.

Url Button

The Url Button opens an in-app Messenger webview (browser) with given address.

909
...
buttons: [
  {
    "type": "url",
    "title": "Freedom",
    "payload": "https://en.wikipedia.org/wiki/Liberty"
  }
]
...
ParameterTypeDescription
type*stringMust be set to url.
title*stringTitle of the button. Max size is 20 characters.
payload*stringUrl to be opened.

🚧

Requires Domain Whitelisting

Url passed to the webview with url button must be whitelisted (including subdomains). See domain whitelisting.

Postback Button

When the user taps on the postback button, it sends developer-defined payload back on Postback Received webhook. You can perform an action or reply back when this happens.

848
...
buttons: [
  {
    "type": "postback",
    "title": "List Items",
    "payload": "{{PASS_THROUGH_PARAM}}"
  }
]
...
ParameterTypeDescription
type*stringMust be set to postback.
title*stringTitle of the button. Max size is 20 characters.
payload*stringAny arbitrary data you can send to Postback Received webhook. Max size is 1000 characters.

Call Button

Call Button initiates a phone call.

909
...
buttons: [
  {
    "type": "phone",
    "title": "Call Us",
    "payload": "+1 (555) 857-6309"
  }
]
...
ParameterTypeDescription
type*stringMust be set to phone.
title*stringTitle of the button. Max size is 20 characters.
payload*stringPhone number that will be dialed. Make sure the phone number is in international format.