Facebook is one of the largest social networking website and by 2016 Facebook shown a great success with 1.65 billion active users. Facebook is not only meant for chatting and sharing ideas, but also it is one the biggest e-commerce and business platform and you won’t be wrong in calling it as one of the largest advertising agency on the globe after Google. Recently, Facebook also announced their own ads programme for Android and iOS app developers.
By Integrating tools from Facebook as such Page like widget, share button and like button for your website you can really get a lot of traffic from Facebook itself. Well, those who are looking to integrate Facebook comment plugin in WordPress without adding new plugin and burdening their WordPress and hosting bandwidth can now add Facebook comments plugin in very few simple steps.
Advantages of integrating Facebook comment plugin
- Adding Facebook comment plugin into WordPress is like using Content Delivery Network (CDN) as you have already done with awesome-font, jquery etc. which saves your hosting bandwidth and loads in very quick of time
- Very easy to integrate into WordPress without the knowledge of any coding
- Genuine and Spam free comments
- Easy to hide, approve/ disapprove comments
- Ban or unable annoying users
- Add multiple users to manage comments
- Get notified on the Facebook notification area
Steps to Add Facebook comments plugin in WordPress
In order to integrate Facebook comments plugin in WordPress you require Facebook APP ID which you can get from Facebook developers center.
Next step is adding essential HTML tags into header file of the WordPress. The header section of the page is included into the file named header.php. This file is located in the default (your current) theme’s folder. Using FTP or cPanel or WordPress admin you can edit header.php file. You need to add following code in the header.php file within the <head> section:
<meta property="fb:app_id" content="ADD YOUR APP ID HERE"> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=ADD YOUR APP ID HERE"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
Displaying Facebook comments box
The final step is displaying of Facebook comment box on your WordPress. You need to add following code into the file content-single.php or single.php file.
Note: Depending up on the theme the file name may be different.
You need to add following code within <footer> section or anywhere where you want to display the comment box.
<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-num-posts="5" data-width="100%" data-colorscheme="light" data-mobile="false"> </div>
Congratulations!
You have successfully added Facebook comment plugin