Saturday, 26 October 2013

Add Facebook Like and Share Button API to Website

Copy & Paste this code for Facebook like button with count:

<div id="fb-root"></div>
<script type="text/javascript">(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>
<div class="fb-like" data-href="http://brijeshsolutions.blogspot.com" data-send="false" data-layout="button_count" data-width="200" data-show-faces="false"></div>



Copy & Paste this code for Facebook Share button with count:

<div style='float:center;padding:0px 0px 0px 25px'>
<a share_url='http://brijeshsolutions.blogspot.com' href='http://www.facebook.com/sharer.php'  name='fb_share' type='button_count' target="_blank">Share Brijesh Solutions< /a><script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share' type='text/javascript'></script>

</div>

No comments:

Post a Comment