Skip to Content

Why is my Facebook comment plugin not showing?

Why is my Facebook comment plugin not showing?

If you have added a Facebook comment plugin to your website but it’s not showing up, there are a few common reasons why this might happen and some steps you can take to try and fix it.

Have you included the JavaScript SDK?

In order for the Facebook comment plugin to work, you need to include the Facebook JavaScript SDK on every page where you want the plugin to appear. This allows Facebook to load the necessary JavaScript files and initialize the plugin.

To add the JavaScript SDK, place this code directly after the opening <body> tag on each page:

<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script>

This code snippet loads the SDK asynchronously so it doesn’t block page loading. Make sure it’s included on every page where you want the comment box to show up.

Is your app ID correct?

When initializing the Facebook comment plugin, you need to specify your Facebook app ID. This connects the comments to your Facebook app.

To find your app ID:

  1. Go to the App Dashboard in Facebook Developers
  2. Click on your app
  3. Copy the App ID listed under App Details

When adding the comment plugin code, make sure you are using the right app ID, for example:

<div class="fb-comments" data-href="https://example.com/page.html" data-width="100%" data-numposts="5" data-appid="1234567890"></div>

If the app ID is incorrect or doesn’t match the one configured for your app, the comments won’t show up.

Is your app in Development mode?

Facebook apps start in Development mode by default. While in Development mode, the comment plugin will only be visible to admins, developers and testers of the app.

To make the plugin visible to everyone, you need to switch your Facebook app to Live mode. Here’s how:

  1. Go to your App Dashboard
  2. Click on Settings > Basic in the left sidebar
  3. Next to App Review, click Switch to Live

Once you switch to Live mode, the comment plugin should now be visible to all visitors.

Are you using the correct URL?

When initializing the comment box, you need to specify the correct page URL using the data-href attribute:

<div class="fb-comments" data-href="https://example.com/page.html" data-width="100%"></div>

Make sure this URL matches the actual page URL you are adding the code to. If there is a mismatch, the comments won’t load.

You can also use relative URLs like data-href="/page.html" but the domain needs to match your website.

Did you register your domain?

For the comment plugin to work on your site, you need to register your domain with Facebook. This verifies that you own the domain.

To register your domain:

  1. Go to the App Dashboard
  2. Click Settings > Basic in the sidebar
  3. Under App Domains, enter your domain e.g. example.com
  4. Click Save Changes

Once your domain is registered, the comments should start working within a few hours.

Are you using HTTPS?

Facebook requires the Facebook comment plugin to be used on HTTPS pages for security reasons. If your website is on HTTP, the comments won’t show up.

To fix this:

  1. Switch your site to HTTPS if possible
  2. Use a relative protocol like //example.com/page.html in the data-href attribute

Using a relative protocol allows the SDK to load the same comments box over HTTP or HTTPS.

Are comments closed for that page?

If you are using the WordPress plugin for Facebook comments, you have the option to disable comments on specific pages and posts.

To check if comments are disabled for a page:

  1. Edit the page in WordPress
  2. Expand the Discussion box
  3. Make sure “Allow Comments” is checked
  4. Save your changes

If comments were disabled, enabling them again should make the comment box show up.

Did you recently make app changes?

If you recently changed app settings like the app secret or ID, or switched the app to Live mode, it can take some time for the changes to propagate.

Try waiting 24-48 hours for the app changes to take effect across Facebook’s servers. The comment box should start working normally again after some time.

Are there errors in the browser console?

Open your browser’s console (CTRL + Shift + J on Chrome) and check if there are any errors related to the Facebook SDK or comments plugin.

Common errors include:

  • App ID does not match domain
  • App domain not verified
  • Missing SDK
  • Blocked by privacy settings

Fixing these errors can help get the comment plugin working again.

Did you test with the App Domain?

When testing the comments box in development, try accessing it via your app domain rather than localhost. For example:

https://<YOUR-APP-ID>.localhost.com

Or on a remote server:

https://<YOUR-APP-ID>.app.facebook.com

This will more closely mimic the actual domain and bypass some cross-domain restrictions.

Are you using any custom mods or filters?

Some WordPress plugins that alter page content like security mods, optimize scripts, ad injectors etc can sometimes interfere with the Facebook SDK and comment plugin.

Try troubleshooting with all plugins disabled. If that fixes it, turn plugins back on one-by-one until you find the problematic plugin.

Did you recently migrate domains?

If you recently migrated your site to a new domain, the Facebook comment plugin won’t work on the new domain until you reconfigure your Facebook app settings.

Here’s what you need to update:

  1. App Domains – add your new domain
  2. App Platform – add your new domain as a platform
  3. Use the new domain in the comment plugin code

After updating the app with your new domain info, the comments should start working after about 24 hours.

Is there a server configuration issue?

On some hosts, server configurations like firewall rules, hotlink protection, CORS settings etc can block Facebook from accessing your pages and loading the plugin.

Check with your hosting provider that no such restrictions are in place on your server blocking Facebook.

Conclusion

Here are some troubleshooting steps to summarize:

  • Verify the Facebook SDK is added
  • Check the app ID is correct
  • Make sure the app is Live, not in Development
  • Use the right URL in the data-href attribute
  • Register your domain in Facebook
  • Use HTTPS or a relative protocol
  • Make sure comments are enabled for that page
  • Test after waiting for recent app changes to propagate
  • See if any errors show up in the console
  • Test using your app domain instead of localhost
  • Disable plugins to check for conflicts
  • Update app domain settings if you migrated domains
  • Check for server restrictions blocking Facebook

Following these troubleshooting tips should help identify and fix any issues getting the Facebook comment plugin to show up on your site.

Here are some additional resources that may help:

I hope these steps help you get the Facebook comment plugin working again! Let me know if the comments start showing up or if any other issues come up.