Monday, March 26, 2012

Add social networking tools in your website



You may need  to add social networking tools, such as Facebook, twitter, Google + button in your website for your website popularity and e-marketing.

To get  facebook like embed code:
http://developers.facebook.com/docs/reference/plugins/like/


To get twitter and follow twitter embed code
https://twitter.com/about/resources/buttons#tweet


To get Google +1 button embed code
http://www.google.com/webmasters/+1/button/


Below is the example of the code, replace my url  http://jiansenlu.blogspot.com/ to yours.

 <!--Facebook like button, (div is the style for me, you may not need it): -->
 <div style="float:left;margin-top:-0.2em;margin-left:2em;">
            <iframe src="http://www.facebook.com/plugins/like.php?href=
http://jiansenlu.blogspot.com/&show_faces=false&layout=button_count" scrolling="no" frameborder="0"
                style="border:none; width:300px; height:80px">
        </iframe>
    </div>


<!--Twitter button: -->
 <div style="float:left;margin-top:-0.2em;margin-left:2em;">
        <a href="http://twitter.com/share" class="twitter-share-button" data-counturl="
http://jiansenlu.blogspot.com/" data-url="http://jiansenlu.blogspot.com/" data-text=" " data-count="horizontal" data-via="CanHealth">Tweet</a>
        <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
    </div>


<!--Follow  in Twitter: -->
 <div style="float:left;margin-top:-0.2em;margin-left:-18em;">
    <a href="https://twitter.com/jiansenlu" class="twitter-follow-button" data-show-count="false">Follow @jiansenlu</a>
<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>
</div>


<!--Google +1 Button: -->
 <!-- Place this tag where you want the +1 button to render -->
<g:plusone href="
http://jiansenlu.blogspot.com/"></g:plusone>

<!-- Place this render call where appropriate -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
The result: (Google +1 code works fine for my other websites, but some problem with my blogger)
 

No comments:

Post a Comment