Skip to content
add facebook customer chat to wordpress

How to Add Facebook Customer Chat (Live Chat) to your Website

Facebook has just released the Facebook Customer Chat Plugin a week ago. By embedding this widget to your website, your customers can chat with you via Facebook Messenger in real-time right on your website. That means they don’t have to navigate to Facebook or Facebook Messenger to send you a message anymore.

facebook customer chat

With this feature, Facebook Customer Chat (Facebook Live Chat) helps you a lot in supporting the customers, consulting or selling right on your website. You can manage and take care of your customers via Facebook Messenger.

Adding Facebook Live Chat To Your Website

To install Facebook live chat widget to your website, follow these steps:

Step 1: Go to your Fanpage → Settings → Messenger Platform. In the Whitelisted Domains, enter your domains of your website(s). Then click Save to complete.

Add your domain to Facebook messenger platform

Add your domain to Facebook messenger platform

Step 2: Copy and paste the following code before the </body> tag of your website:

  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'));
<div class="fb-customerchat" page_id="PAGE_ID"></div>


  • your-app-id: Replaced by your Facebook app ID. If you don’t have any app, create one here.
  • PAGE_ID: Replaced by your Fanpage ID. Get it here.

Adding Facebook Customer Chat (Live Chat) to WordPress

If you’re using WordPress, you can add the code above to the footer.php file. Doing that by going to Appearance → Editor and select the footer.php file, then paste the code above before </body> tag.

Adding Facebook Customer Chat Plugin To WordPress

Adding Facebook Customer Chat Plugin To WordPress

Please note that this modifies your theme. And thus, you will loose the change when the theme updates. To prevent this problem, please use a child theme. We have written a detailed guide on using child theme to customize your WordPress website.

If you are not familiar with these technical things, you can install the Slim SEO plugin. It’s free and available on To install it, go to Plugins → Add New and search for “slim seo”, then click Install button. After that, activate the plugin. Finally, go to Settings → SEO and paste the code above to the footer section.

insert header and footer code

Insert header and footer code

Now you have the Facebook chat online plugin installed. And you can start using it as a channel for customer live chat support and sell your products.


  1. Patrick on September 12, 2018 at 02:25

    Finally, an angel. Ive been looking for this the whole night. is ambiguous.

  2. Richard Vargas on September 14, 2018 at 18:38

    I followed these instructions precisely and no messenger app has appeared on my website. I am using a WordPress website.

  3. Nazmul Haque on October 31, 2018 at 20:18

    Not working with Divi

Leave a Reply


Subscribe to our newsletter to receive news and tutorials about our themes and WordPress.

Scroll To Top