How To Install Facebook Messenger Customer Chat Plugin On Your Website!


1.  Install the Facebook SDK on your website.  To do this copy and paste the code below into the body of all pages you want the Facebook Customer Chat to appear on (Some Themes allow for this to be added to all pages in one area.

window.fbAsyncInit = function() {
appId                                   : ‘your-app-id‘,
autoLogAppEvents           : true,
xfbml                                   : true,
version                                : ‘v2.11’

(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); = id;
js.src = “”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));

This code will load and initialize the SDK. You must replace the value in your-app-id with the ID of your own Facebook App leaving the ‘ ‘ surrounding your app ID. You can find this ID using the App Dashboard.

Whitelist your domain to connect your Facebook Page to your website via the Facebook. Then go to your Facebook Page (Cannot be a group or personal page).  Next go to Page Settings > Messenger Platform > Whitelisted Domains, and add your website url.

3. Add the plugin on your webpage by including a div with the following attribute in your HTML: (This will also need to be added to every page you want the chat to be view-able on)

<div class="fb-customerchat"

(Note All fields need to be completed. So any of the code in step 3 with data in between the < and > symbol needs to be added or deleted.)


<div class="fb-customerchat"

The minimized attribute: specifies whether the plugin greeting text should be minimized or shown. Defaults to false on desktop and true on mobile browsers.


If you need help setting this up feel free to message us Via the Facebook Customer Chat!

For more detailed information or information on how to customize the Facebook Customer Chat Plugin, Visit the Facebook Blog Post found here.


Leave a Comment