Skip to Content

How do I integrate Facebook comments with WordPress?

How do I integrate Facebook comments with WordPress?

Allowing readers to comment and engage with your content is an incredibly powerful tool for building community on your WordPress site. One of the most popular and effective ways to add commenting is by integrating Facebook comments.

Facebook comments allow your readers to post comments using their Facebook accounts. This is beneficial for a few key reasons:

– Increased engagement – Many users are already logged into Facebook, making it easy for them to engage with your content.

– Social verification – Facebook profiles add more legitimacy to comments than anonymous posts.

– Built-in moderation – Facebook comments allow you to moderate and filter out spam easily.

– Social sharing – Readers can easily share your content back to their own Facebook newsfeeds.

Integrating Facebook comments also helps your SEO by keeping users on your site longer. The more time they spend reading and commenting, the more signals search engines receive about your content quality.

In this guide, we’ll walk through the full process of integrating Facebook comments into your WordPress site, step-by-step.

Prerequisites

Before diving into the integration, make sure your site meets these requirements:

– You must be using WordPress.org self-hosted WordPress, not WordPress.com.

– Your server must be running PHP 5.4 or higher.

– You need a Facebook app ID and Facebook app secret code. We’ll cover how to get these below.

– Your WordPress theme needs to support comments. Most themes include comment support out of the box.

– You should be using a WordPress plugin to add the Facebook comments integration code. We’ll cover plugin options below.

As long as your site meets these requirements, you should be able to successfully integrate Facebook comments.

Step 1: Create a Facebook App

The first step is to create a Facebook app to get your app ID and secret code:

1. Login to https://developers.facebook.com/ and click on “My Apps” in the top menu.

2. Select “Create App” to create a new app.

3. Give your app a name and contact email.

4. Click through the security check and select “Create App”.

5. From the dashboard, click “+ Add Product” and select Facebook Login.

6. For the Valid OAuth redirect URIs, enter your WordPress site URL.

7. Save your changes.

8. Copy and save the App ID and App Secret keys. You’ll need these soon.

This creates the Facebook app that connects your site for commenting. Make sure you save the App ID and App Secret for later.

Step 2: Find a WordPress Plugin

Now that you have a Facebook app created, you need a WordPress plugin to integrate the code into your site. There are a few good options:

– **Facebook Comments Plugin** – The official plugin from Facebook. Simple and lightweight.

– **Social Plugins** – Adds Facebook commenting plus other social sharing options.

– **Disqus** – A third-party platform that includes Facebook integration.

I recommend the official Facebook Comments Plugin, since it’s made specifically for this purpose. Once you’ve chosen a plugin, install and activate it on your WordPress site.

Installing Plugins

To install a plugin in WordPress:

1. In your WordPress dashboard, go to Plugins > Add New.

2. Search for the plugin name.

3. Click Install, then Activate.

The plugin will now be live on your site.

Step 3: Get the Comment Box Code

Now we’ll get the code needed to embed the Facebook comment box.

In your Facebook app dashboard, go to Settings > Basic to get your Comments Social Plugin code.

It will look something like this:

“`html

“`

This contains your unique app ID to enable comments on your site.

Step 4: Configure Your Plugin

Now go back to your WordPress site and configure your plugin using the code you just copied:

1. In your WordPress dashboard, go to the plugin settings page.

2. Paste your Comments Social Plugin code into the provided field.

3. Make sure your Facebook App ID is correct.

4. Customize any other settings like number of comments, color scheme, etc.

5. Save your changes.

The plugin will take care of integrating the code throughout your site.

Some plugins may have additional setup steps, so refer to your plugin’s documentation if needed. But those are the core steps to paste your Facebook code and configure the integration.

Step 5: Moderate Comments

With Facebook comments enabled, you now need to moderate and manage the discussions.

There are a couple ways to moderate Facebook comments on WordPress:

**1. Moderate from Facebook**

Since these are Facebook comments, you can view and manage them right within Facebook:

– On your Facebook page, go to Settings > Comments to view them all.

– Use the tools to ban, delete, or hide unwanted comments.

– Set a profanity filter and blacklist certain words.

**2. Moderate from WordPress**

Your WordPress plugin may also include moderation abilities:

– The plugin dashboard will display all of your Facebook comments.

– You can reply, delete, or report comments here.

– Adjust moderation settings like auto-approving comments from certain people.

Take some time to explore the moderation options within Facebook and your WordPress plugin. Keeping comments civil and spam-free will encourage more engagement.

Integrating Comments into Your Theme

The last step is to make sure your theme is displaying the Facebook comment box properly.

Most WordPress themes include comment support with a comment template like comments.php. The plugin will integrate the code into this template automatically.

To double check, open your single post template (usually single.php or post.php) and verify it contains the WordPress comments template:

“`php

“`

This will output the comment box below each post.

Some themes may require you to manually add the Facebook code to individual templates. Refer to your theme developer documentation for more placement options.

At this point the commenting system should be successfully embedded across your WordPress site!

Conclusion

Integrating Facebook comments is an easy way to add more engagement to your WordPress site. The key steps are:

1. Creating a Facebook app for the integration.

2. Installing a plugin to add the code throughout your site.

3. Pasting your Facebook Comments Social Plugin code into the plugin.

4. Configuring moderation settings and making sure your theme supports comment output.

With those fundamentals set up, Facebook users can easily post comments using their existing profiles. This creates more legitmate discussions while still giving you moderation control.

Facebook commenting is just one part of an overall commenting strategy. You may also want to include basic WordPress commenting or other third party platforms. Offering multiple options caters to more of your audience while increasing engagement across the board.

Pros Cons
Increased engagement from Facebook users Less control than WordPress native comments
Leverages Facebook profiles Require users to have Facebook accounts
Social sharing built-in Moderation happens outside WordPress
Great for established Facebook pages Setup requires creating Facebook app