-
class
Facebook.generate.
Generate
[source]¶ Bases:
object
Creates a button and returns the dictionary containing the button data
For more info https://developers.facebook.com/docs/messenger-platform/send-api-reference/buttons
Parameters: - button_type (str) – Type of button.
- title (str) – Title of the button. Max 20 characters.
- url (str) – This URL is opened in a mobile browser when the button is tapped.
- payload (str) – This data will be sent back to your webhook. 1000 character limit.
- webview_height (str) – Height of the Webview. Valid values: compact,tall,full.
Returns: A dictionary containing mapping between proper keys and arguments.
Return type:
-
static
element
(title, subtitle=None, image_url=None, buttons=None)[source]¶ Generates payload for element
Parameters: Returns: A dictionary containing mapping between proper keys and arguments.
Return type: