How to Seamlessly Add Facebook Comments in WordPress

Learn how to add Facebook comments in WordPress website to boost social engagement and simplify the commenting experience for your visitors. Step-by-step guide included.

Engaging your audience through comments is a powerful way for adding Facebook comments in wordpress can amplify this interaction, as comments left on your site are shared on Facebook, reaching a broader audience. Plus, most users are already logged into Facebook, making it easier for them to comment.

Facebook comments in WordPress

Setting Up Your Facebook App

To integrate Facebook comments, you’ll need to create a Facebook App. Here’s how to do it:

  1. Visit Facebook Developers: Go to the Facebook Developers website. In the top right corner, click on “My Apps” and select “Add a New App.”
  2. Create Your App: Name your app – it’s helpful to use your website’s name for consistency – and click “Create App ID.”
  3. Configure Your App: You’ll see the App Dashboard. Navigate to Settings > Basic. Click “Add Platform” at the bottom, choose “Website,” enter your site’s URL, and save changes.
  4. Set App Domains and Privacy Policy: Add your domain in the “App Domains” field and link to your site’s privacy policy in the “Privacy Policy URL” field. Save these changes.
  5. Make Your App Live: At the top of the page, switch the status from “In Development” to “Live.”

Generating the Comment Code

Next, you’ll need to get the code to integrate Facebook comments into your site:

  1. Access Facebook Comments: Go to the Facebook Comments plugin page. Click “Get Code.”
  2. Select Your App: In “Step 1,” choose the Facebook App you just created from the dropdown menu.
  3. Insert the Code:
    • Step 2: Copy the code provided and add it to your site. Use the Insert Headers and Footers plugin to paste it into the “Footer Scripts” box if you’re not comfortable with code editing.
    • Step 3: Replace your theme’s comment area with the provided code. This typically involves editing the comments.php or single.php file. For Genesis child themes, use ‘<?php echo get_permalink(); ?>‘ to ensure comments are linked to the current post’s URL.
<div class="fb-comments" data-href="<?php echo get_permalink(); ?>" data-numposts="5"></div>

Moderating Facebook Comments

As the app creator, you can moderate comments. To add other moderators:

Navigate to Roles: Go back to Facebook Developers and select your app from the “My Apps” dropdown.

Add Administrators: Click on “Roles” in the left column. Then, click “Add Administrators” and type the person’s name. If they’re not your Facebook friend, use their profile URL slug.

If you are not friends with them, use the URL slug from their Facebook profile. For instance, my Facebook profile is https://www.facebook.com/noomaan, so you’d use “NooMaan”.

Conclusion

Integrating Facebook comments on your WordPress site is a fantastic way to boost engagement and make commenting seamless for your users. Follow these steps to get started and enjoy a more interactive and socially shared comment section on your site.

Leave a Reply

noomaan_wordpress_developer-favicon-865f

Noman Ali

Noman Ali is web developer at Dev House, a custom software development agency focusing on high performance sites for web applications.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Other articles in this series

How to Seamlessly Add Facebook Comments in WordPress

Learn how to add Facebook comments in WordPress website to boost social engagement and simplify the commenting experience for your visitors. Step-by-step guide included.…

How to add Gutenberg Shortcodes in WordPress: A Comprehensive Guide

Unlock the power of Gutenberg shortcodes in WordPress to create dynamic, interactive, and SEO-friendly content. Learn how to use, customize, and optimize shortcodes for…

Learn Gutenberg Theme Development

Learn how to master Gutenberg theme development for WordPress with our comprehensive guide. Discover essential techniques, best practices, and advanced tips to create visually…

4 Easy Steps to Remove Core WordPress Blocks

Learn how to remove core WordPress blocks and improve your theme's design and functionality. Our guide provides detailed steps for unregistering unnecessary blocks.

Recommended Freeelancing Services