Adding Facebook Messenger to your site

This article will show you how to add Facebook Messenger to your Placester site using the Javascript section.  Please note that this feature is currently only available on certain subscription levels. If you notice that you don’t have access to this feature and would like to learn more please visit our packages and pricing page.

Please note: We cannot guarantee Facebook Messenger will always work on your Placester site. Facebook may make updates to their Messenger plugin, leading it be incompatible with Placester sites.

 Whitelisting Your Domain Through Facebook

 First, you will need to login into your Facebook Business page to Whitelist your domain. Click “Settings” and then “Messenger Platform.”

Click_Settings.png

From here, go to the “Whitelisted Domains” section. Add the full domain of your Placester site here. Please make sure to include “https://” in your domain.

whitelist_domains.png

 

Obtaining Page ID for the Chat Plugin

 In the Messenger Platform settings, go to “Customer Chat Plugin” and click “Setup.”

Chat_plugin.png

From here, you need to get the Page ID for your Facebook Chat Plugin. Please note: The customization options and set-up code Facebook provides are not compatible on Placester, so you can skip to the end to get the Page ID within the “Code Snippet.”Page_ID.gif
 

 

Adding Facebook Messenger to Placester

Once you have the Page ID, login to your Placester account. To access the CSS/Javascript editor from your Dashboard, click on “Edit Site” in the Quick Actions menu.

Quick_Actions.png

This will take you to your Site Settings.  Scroll down to the Site Design section and click on “Custom CSS & JS”

Custom_CSS___JS.png

To make sure the widget is placed correctly on the page click on the gear next to Custom Javascript.  Select “Footer”.Footer.png

 

In the JavaScript section, paste the following code. Within this code, you need to replace “YOUR_PAGE_ID” with the Page ID you got from Facebook.

 

(function (d, $) {
$(d).ready(function () {
var fbCustomerChat = d.createElement("div")
fbCustomerChat.setAttribute("class", "fb-customerchat");
fbCustomerChat.setAttribute("page_id", "YOUR_PAGE_ID");
console.log(fbCustomerChat);
d.getElementById("fb-root").appendChild(fbCustomerChat);
window.fbAsyncInit = function () {
FB.init({
xfbml: true,
version: 'v3.2'
});
};
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(d, 'script', 'facebook-jssdk'));
});
}(document, jQuery));


JS.gif

 

Finally, click the Green save button and you are all set!

 

Need More Help?

If you have additional questions about adding Facebook Messenger to your site, let our support team know at support@placester.com.


How did we do?


Powered by HelpDocs