5 July 2012 0 Comments

how to insert facebook comments in our webpage

Place comments section in your web-page same like facebook comments section
facebook comments plugins for our site

Recently i am working on the custom php projects for my client and he need to place facebook comment section in all web page. social networking site facebook provide the plugin through which we can place the same comments section in our own site, its looks and work same as we see on the facebook wall, for each URL we can place the comments section in our site. its also provide the width and height option which is valuable for custom programming. you can set facebook comments section width and facebook comment section height as per your requirement. Let me clear you guys that the height will not come in the pixel but its come in the number of comments we want to show. Below is the code which you need to set in your web-page.

 
Code 1
 
<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/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
 
Code 2
 
<div data-href="http://www.freelancephpdevelopment.com/" data-num-posts="10" data-width="640"></div>

Here, Code 1 is common for all the pages which include the java script code and no need see anything just place it below thetag

In Code 2, data-href is the Page Link of your web-page where you want to place comment section and you need to set number in data-num-posts which will shows number of comments. I Hope this post make your work simpler. if you have any issue then you can contact php freelancer

if you are looking for PHP Freelancer USA, Wordpress Freelancer USA or you want to hire PHP freelancer USA then You can contact me. if you have any work related to php development then You can contact me. I am working in the PHP since 2005, so i have good experience in the php development.

Leave a Reply

Powered by Sweet Captcha
Verify your real existence,
Drag the biggest seed to the flowerpot
  • captcha
  • captcha
  • captcha
  • captcha