You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/FB_TEMPLATE_MESSAGE_BUILDER.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,12 @@ _Arguments_:
114
114
| addBubble | Yes | title (string, required), subtitle (string) |`this` for chaining | Each Generic template can have 1 to 10 elements/bubbles, before you add anything to it. It requires element's title, but it can also accept element's subtitle |
115
115
| addUrl | No | A valid URL |`this` for chaining | Adds an url to a current element, requires a valid URL, also requires `addBubble` to be added first |
116
116
| addImage | No | A valid absolute URL |`this` for chaining | Adds an image to a current element, requires a valid URL, also requires `addBubble` to be added first |
117
-
| addButton | Yes | title (string, required), value (required, string or a valid URL) |`this` for chaining | Adds a button to a current element, each button requires a title and a value, where value can be any string if you want `postback` type or a valid URL if you want it's type to be `web_url`, at least one button is required, and maximum 3 of them is allowed. It also requires `addBubble` to be added first |
117
+
| addButton | Yes, at least one of the button types | title (string, required), value (required, string or a valid URL) |`this` for chaining | Adds a button to a current element, each button requires a title and a value, where value can be any string if you want `postback` type or a valid URL if you want it's type to be `web_url`, at least one button is required, and maximum 3 of them is allowed. It also requires `addBubble` to be added first |
118
+
| addCallButton | Yes, at least one of the button types | title (string, required), phoneNumber (required, string in '+1234...' format) |`this` for chaining | Adds a call button, check [official docs](https://developers.facebook.com/docs/messenger-platform/send-api-reference/call-button) for more info |
119
+
| addShareButton | Yes, at least one of the button types | No args. |`this` for chaining | Adds a share button, check [official docs](https://developers.facebook.com/docs/messenger-platform/send-api-reference/share-button) for more info |
120
+
| addBuyButton | Yes, at least one of the button types | title (string, required), value (required, string), paymentSummary (required, object, check [official docs](https://developers.facebook.com/docs/messenger-platform/send-api-reference/buy-button) for more info) |`this` for chaining | Adds a share button, check [official docs](https://developers.facebook.com/docs/messenger-platform/send-api-reference/buy-button) for more info |
121
+
| addLoginButton | Yes, at least one of the button types | url (required, a valid URL) |`this` for chaining | Adds a login button, check [official docs](https://developers.facebook.com/docs/messenger-platform/account-linking/link-account) for more info |
122
+
| addLogoutButton | Yes, at least one of the button types | No args. |`this` for chaining | Adds a logout button, check [official docs](https://developers.facebook.com/docs/messenger-platform/account-linking/unlink-account) for more info |
118
123
| addQuickReply | No | title (string, required, up to 20 characters), payload (string, required), up to 1000 characters |`this` for chaining | Facebook allows us to send up to 10 quick replies that will appear above the keyboard |
119
124
| setNotificationType | No | type (string, one of `REGULAR`, `SILENT_PUSH` or `NO_PUSH`) | `this` for chaining | REGULAR will emit a sound/vibration and a phone notification; SILENT_PUSH will just emit a phone notification, NO_PUSH will not emit either
120
125
| get | Yes | No args. | Formatted JSON | Get method is required and it returns a formatted JSON that is ready to be passed as a response to Facebook Messenger |
0 commit comments