Hello peoples,
I am back with a new interesting article on how to integrate facebook comment system in your project. It works also in your local server like xampp, Wamp, Aimpps, Lamp, Mamp etc.
You may integrate your manually comment system in your website/application but have you ever tried the facebook comment system?? I think no. So this tutorial is perfect for you.
I am showing you by my system that I have made for example a blog post system where Just below of every post there has a comment section that is comming from facebook. So Let’s start :
Step 1. At first you need to make a developers account in facebook.
step 2. After creating the developers account see in the menu bar you must see here has a drop down list at the right side where has my apps option click there.
Step 3. Now click on add new app button just right side of the page. And fill up the popup form and click on create app id button.
Step 4. Now fill up the captcha and click submit.
Step 5. After submitting captcha you will be redirected in the Dashboard page. Click on the dashboard from left sidebar. And you will be see like this below and then click on the question marked icon to active your comment system. Example in the below.
Step 6. Now you will be asked for making this app public or not. You must say YES and then choose a category by dropdown for example “Education” and confirm it.
Step 7. Now click here and in “URL to comment on section” give your project url ex: http://localhost/myTest/
And choose number of post. Let it 5. And just below of the pae click on “Get Code” button.
Step 8. Now you will be given 2 steps by facebook and in every step there have codes. You need to integrate this step 1 code just after starting <body> tag,
and the code of step 2 need to integrate in where section of your page will be visible the comment section.
Step 9. Now For giving comments in different post you need to change the code the data-href section.
Step 10. It’s simple just need to give the current URL of the page use this code for get the current page url. And you are ready to get and give facebook comment
basename($_SERVER[‘REQUEST_URI’]);