How to add Share on Orkut button to blog?

Here comes the another feature of new orkut which I think would be very useful to Bloggers. Like Share on Twitter buttons which i explained last week, Orkut too released its API and now you can have share on orkut button on any blogging platform like WordPress and Blogger aka Blogspot Blogs.


Let’s get started with How to add Share on Orkut button in your blogpost, at the end of blog posts.

 
How to add Share on Orkut button on Blogger / Blogspot Blogs

 

Go to Edit HTML tab under Layout of Blogger — Expand Widget Templates

 

Press CTRL+F and find </head> Now, just above or before this paste the following code.

 

<!--orkut share starts here-->
<script src='http://www.google.com/jsapi' type='text/javascript'/>
<script type='text/javascript'>
google.load(&#39;orkut.share&#39;, &#39;1&#39;);
google.setOnLoadCallback(function() {
var params = {};
params[google.orkut.share.Field.TITLE] = &#39;<data:blog.pageName/>&#39;;
params[google.orkut.share.Field.DESTINATION_URL] = &#39;<data:blog.url/>&#39;;
var connection = new google.orkut.share.Connection(params);
document.getElementById(&#39;orkut-share&#39;).onclick =
function(e) { connection.send(&#39;orkut.com&#39;, {}); };
}, true);
</script>
<!--orkut share end-->


 



 



Now find <div class=’post-footer-line post-footer-line-1′> and add this code immediately after it



 



<b:if cond='data:blog.pageType == "item"'>
<span id="orkut-share" style="cursor:pointer; border:1px solid black">
<img src="http://code.google.com/apis/orkut/docs/images/share.gif"/>
</span>
</b:if>


 



You have successfully added share on orkut button blogger, Thanks to bloggerstop who shared this tip.



Now you can see orkut share button below each post.



 



How to add Share on Orkut button on WordPress blog


 



Comparing to Blogger, its somewhat easier to add share on orkut button on self hosted WordPress Blogs.



There is a Share on Orkut WordPress plugin which makes it very easy to do it but why add a plugin for such a small thing and increase load on webpage when you can do it simply by adding a code.



 





   1: <a href="http://promote.orkut.com/preview?nt=orkut.com&amp;tt=&lt;?php the_title(); ?>&du=<?php the_permalink() ?>">



   2: <img src="http://code.google.com/apis/orkut/docs/images/share.gif"> </a>




 



Done!



 



You can see its live demo below this post and do you mind sharing it on orkut? This is made simple using GET Method of Orkut API. You will see share button like this share on orkut and when you click on it- another page opens similar to screenshot below:

Tags: , , , , , ,

Enjoyed this article? Subscribe to our RSS feed (or) sign-up for our free newsletter to hear all what Jain Says directly in your Inbox.

Subscribe via RSS or Email:

About author

Jain T. Chacko is a freelance writer by passion and an Engineer by profession. Active in the blogger world under the title "WhatJainSays" ever since 2010. Through "whatjainsays.blogspot.com" he shares the latest buzz in the e-world, spread across thousands of websites. Loves sharing and learning also prays for world peace.
Related Posts with Thumbnails