Facebook Comments can be a great tool to increase the social sharing of posts. When people leave a comment, it will be shared on Facebook. Since most people are already logged into their Facebook accounts, you’re also simplify their commenting experience.
Anything that integrates with Facebook is called a “Facebook App”. First you’ll need to create an app, then you can generate the comment code to add to your site.
Setup Facebook App
First go to Facebook Developers. In the top right corner go to “My Apps”, then “Add a New App”. Give your app a name – I use the name of whatever website I’m building this on – and click “Create App ID”.
You’ll then see an App Dashboard screen, something like this. In the left column, go to Settings > Basic, then at the bottom click “Add Platform”. Select “Website” as the platform, then type in your website’s URL and click “Save Changes”.
At the top of the page you’ll see an on/off toggle. It will say “Status: In Development” (screenshot). Flip the switch to “On”, which changes your status to “Live”.
Get Comment Code
Go to the Facebook Comments page. Scroll down to the “Get Code” button and click it.
In “Step 1”, select your newly created Facebook App from the dropdown.
Copy the code from “Step 2” and add it to your site. If you don’t want to edit code, you can use the Insert Headers and Footers plugin and insert it into the “Footer Scripts” box.
Copy the code from “Step 3” and replace your theme’s comment area with it. This one does require code editing unfortunately. You can usually find it in comments.php or single.php. If you’re using a Genesis child theme, do this. Change the URL in the code to
<?php echo get_permalink(); ?> , so that the comments are tied to the current post’s URL. The final code should look like this:
<div class="fb-comments" data-href="<?php echo get_permalink(); ?>" data-numposts="5"></div>
That’s it! You should now have Facebook comments on your site.
Whoever sets up the app is an “Administrator” and can moderate comments. If you’d like to add additional people (ex: your client), go back to Facebook Developers and select the app from the “My Apps” dropdown.
In the left column, click “Roles”. You should see a page like this. Click “Add Administrators” and type in the person’s name.
If you are not already friends with them, use the URL slug from their Facebook profile. For instance, my Facebook profile is
https://www.facebook.com/billerickson, so you’d use “billerickson”.