How to add facebook comments Plugin in Wordpress



Facebook comments
Facebook comments

.

In this tutorial we will see together how to add a Facebook comments plugin on wordpress.

Create an ID application for your site

It is a necessary step for the creation of "facebook comments".


For that you must go to the link https://developers.facebook.com/apps/



 Créer une application ID pour son site



Click on Add a platform

 Créer une application ID pour son site

Choose Website

 Créer une application ID pour son site

Type the URL of your Website

 Créer une application ID pour son site

1-Installation "facebook comments" with a code Now go to the comments module page while staying connected with your Facebook Developer account.

Generate the comments plugin code


Générer le code du pluging Comments
Click Get Code


code du pluging Comments
Edit the comments.php file at the root of the wordpress Website

Now via FTP connect to the root of your website, choose the wp-content folder ---> themes ---> your website theme ---> the comments.php file

Right click on the comment.php file then View / Edit. Add the code:

After <section id = "comments-template"> and just before </ if (comments_open () || get_comments_number ()):>

In comments.php paste the code obtained


Editer le le fichier comments.php à la racine de site wordpress
<div id="fb-root"></div>
<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/fr_FR/sdk.js#xfbml=1&version=v2.8&appId=187588705024244";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width="520" data-numposts="5"></div>
Replace http://www.facebook.com/id page fcb with <? php the_permalink (); ?>

In the header.php file add this code

<meta property = "fb: app_id" content = "{Your application ID number}" />

Save all

2-Installation "facebook comments" with a Plugin

Connect to your website and choose Extensions and install the extension Wpdevart Facebook comments

Type your Your application ID number and save
"facebook comments" plugin is well installed on your site

Comments

Post a Comment

Popular posts from this blog

How to Add a Facebook Comments Plugin to Blogger

How to create an e-commerce store on Blogger

How to Create and Add a Forum To Blogger