The Messenger Platform provides a convenient set of web plugins that make it easy for you to start a conversation with people who visit you on the web. All plugins are implemented with the Facebook SDK for Javascript.
The Messenger Platform's customer chat plugin allows you to integrate your Messenger bot directly into your website. This allows your customers to interact with your business anytime with the same personalized, rich-media experience they get in Messenger.
For usage details, see Customer Chat Plugin.
<div class="fb-customerchat" page_id="{PAGE_ID}"> </div>
Attribute | Type | Description |
---|---|---|
| String | Value must be |
| String | Your page ID |
| String | Optional. Custom string passed to your webhook in |
| String | Optional. The color to use as a theme for the plugin, including the background color of the customer chat plugin icon and the background color of any messages sent by users. Supports any hexidecimal color code with a leading number sign (e.g. #0084FF), except white. We highly recommend you choose a color that has a high contrast to white. |
| String | Optional. The greeting text that will be displayed if the user is currently logged in to Facebook. Maximum 80 characters. |
| String | Optional. The greeting text that will be displayed if the user is currently not logged in to Facebook. Maximum 80 characters. |
| String | Optional. Sets how the greeting dialog will be displayed. The following values are supported:
Defaults to |
| String | Optional. Sets the number of seconds of delay before the greeting dialog is shown after the plugin is loaded. This can be used to customize when you want the greeting dialog to appear. |
| Boolean | Deprecation NoticeThis attribute is now deprecated. Please use Optional.
|
Bring a person directly into a conversation on Messenger.
For usage details, see Message Us Plugin.
<div class="fb-messengermessageus" messenger_app_id="{APP_ID}" page_id="{PAGE_ID}" color="{blue | white}" ref="{PASS_THROUGH_PARAM}" size="{standard | large | xlarge}"> </div>
Attribute | HTML5 attribute | Type | Description |
---|---|---|---|
| String | Value must be | |
| String | Your page ID | |
| Number | Your Facebook App ID. | |
|
| String | The button color: Defaults to |
|
| String | The button size: Defaults to |
| String | Optional. Custom string passed to your webhook in |
Send a message to a person from your Messenger bot in the background and opt them in.
For usage details, see Send to Messenger Plugin.
<div class="fb-send-to-messenger" messenger_app_id="{APP_ID};" page_id="{PAGE_ID}" ref="{PASS_THROUGH_PARAM}" color="{blue | white}" size="{standard | large | xlarge}"> </div>
Attribute | Type | Description |
---|---|---|
| String | Value must be |
| String | Your page ID |
| Number | Your Facebook App ID. |
| String | Optional. Color of the button: Defaults to |
| String | Optional. Size of the button: Defaults to |
| String | Optional. Custom state parameter. Max 250 characters. Valid characters are It should be encoded and encrypted for security purposes. |
| Boolean | Optional. If |
Use the ref
param to pass state with the authentication. If you surface the plugin in multiple places, you may want to modify the state based on the place where the plugin is shown.
The checkbox plugin subscribes a person to your Messenger bot as part of a form, such as checkout or sign-up.
For usage details, see Checkbox Plugin.
<div class="fb-messenger-checkbox" page_id="{PAGE_ID}" messenger_app_id="{APP_ID}" user_ref="{UNIQUE_REF_PARAM}" allow_login="{true}" size="{small | medium | large | standard | xlarge}" skin="{light | dark}" center_align="{true|false}"> </div>
Attribute | Type | Description |
---|---|---|
| String | Value must be |
| Number | Facebook Page ID associated with your bot. |
| Number | Your Facebook App ID. |
| String | Unique parameter for referencing a user. Max 250 characters. Valid characters are |
| Boolean | Optional. Enables people to login if no existing session is present. Defaults to |
| String | Optional. Size of plugin: Defaults to |
| String | Optional. Sets the color theme for the plugin content. The following options are supported:
Defaults to |
| Boolean | Optional. Sets whether the plugin content should be center aligned. Defaults to |