Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 2.75 KB

menubuilder.md

File metadata and controls

75 lines (53 loc) · 2.75 KB

@aiteq/messenger-bot > MenuBuilder

Class: MenuBuilder

Index

Methods


Methods

addPostbackMenuItem(title, id, data, [options])

Parameters:

Param Type Description
title string title of the item
id string ID of the item
options object

options object can contain:

Property Type Description
data any payload data to be send when the item is selected
webviewHeightRatio HeightRatio optional height of the Webview
messengerExtensions boolean must be true if using Messenger Extensions
shareButton boolean set to false to disable sharing in the Webview (e.g. for sensitive info)
fallbackUrl string URL to use on clients that don't support Messenger Extensions

Returns: this - for chaining


addSubmenu(title, submenu)

Parameters:

Param Type Description
title string title of the submenu
submenu MenuBuilder

Returns: this - for chaining


addWebUrlMenuItem(title, url, [options])

Parameters:

Param Type Description
title string title of the item
url string ID of the item
options object

options object can contain:

Property Type Description
webviewHeightRatio HeightRatio optional height of the Webview
messengerExtensions boolean must be true if using Messenger Extensions
shareButton boolean set to false to disable sharing in the Webview (e.g. for sensitive info)
fallbackUrl string URL to use on clients that don't support Messenger Extensions

Returns: this - for chaining