Skip to main content

Facebook Button Types

Send a text and buttons attachment to request input from users. Both response templates as well as the persistent menu support buttons that can perform different kinds of actions:


URL Button

URL Buttons
URL Buttons
Open Webview
Open Webview

The URL Button can be used to open a web page in the in-app browser. This button can be used with the Buttons Template, Carousel and List. A web view can be rendered in three different ways: compact, tall or full.

{
type: "web_url",
title: "some title",
url: "https://sanuker.com",
webview_height_ratio: "tall",
messenger_extensions: true,
fallback_url: "https://sanuker.com",
webview_share_button: "hide",
urlTracking: false,
}
PropertyDescriptionRequired
typeweb_urlY
titleString; Limited to 20 charactersY
urlURL of the destination; Must be HTTPS if messenger_extensions is "true"Y
webview_height_ratioHeight of the webview window; Set "compact", "tall" or "full"; Defaults to "full"N
fallback_urlURL to use on clients that don't support Messenger Extensions; Set only if messenger_extensions is "true"; Defaults to url if not specifiedN
webview_share_buttonSet "hide" or unsetN
urlTrackingDefaults to "true"N

Postback Button

Postback Button
Postback Button

The Postback Button helps invoke an action in your chatbot. You can set a payload to the button.

{
type: "postback",
title: "some title",
payload: "some payload",
}
PropertyDescriptionRequired
typepostbackY
titleString; Limited to 20 charactersY
payloadCustom defined payload triggers; Limited to 1,000 charactersY

Call Button

Call Button
Call Button

The Call Button can be used to initiate a phone call directly.

{
type: "phone_number",
title: "Call us",
payload: "+85281930208"
}
PropertyDescriptionRequired
typephone_numberY
titleString; Limited to 20 charactersY
payloadFormat must have "+" prefix followed by the country code, area code and local number without any spaceY

Log In Button

Log In Button
Log In Button

The Log In Button can be used to link a third-party user account to Facebook Messenger.

    {
"type": "account_link",
"url": "https://stella.sanuker.com"
}
PropertyDescriptionRequired
typeaccount_linkY
urlURL of the destination; Must be HTTPSY