IT Certificaions

Google Cloud Platform

Tuesday, February 21, 2012

FB Sharing and twitter sharing using java script


Use this line in your html code:
<a name="fb_share" type="button" share_url="http://knowledge-serve.blogspot.com" ></a>


 <a href="https://twitter.com/share" class="twitter-share-button" data-related="jasoncosta" data-lang="en" data-size="medium" data-count="none"></a>
     
and also include script from Facebook and twitter java script api...


<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" 
        type="text/javascript">
 </script>



<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>