facebook share button

1) Using javascript
 <div >
<script>var fbShare = {google_analytics: 'true', size: 'small',url: 'http://knowledgeserve.in'}</script>
    <script src="http://widgets.fbshare.me/files/fbshare.js"></script>


2) You can use FBML.....

      <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&appId=APP_ID"; // appId must be valid; 
                                                                                        //  for example: APP_ID=172095742912464

          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <fb:share-button type="button" href=" http://knowledgeserve.in ">


Popular posts from this blog

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Struts 2 - struts tag with boolean property