@aiteq/messenger-bot > MenuBuilder
- addPostbackMenuItem(title, id, data, [options])
- addSubmenu(title, submenu)
- addWebUrlMenuItem(title, url, [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
Parameters:
Param | Type | Description |
---|---|---|
title | string |
title of the submenu |
submenu | MenuBuilder |
Returns: this
- for chaining
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