Thursday, May 10, 2012

Add Twitter’s Tweet Button to WordPress, Blogger, Tumblr


Add Twitter’s Tweet Button to WordPress, Blogger, Tumblr: Twitter has released the official Tweet Button some time ago, this is a good news for the bloggers. It is very easy to use, the javascript code is very compatible with many blogging platforms, like WordPress, Blogger, and Tumblr.

Now, how to add the Tweet Button to your blog?
Go to Twitter’s Tweet button setup page, set your preferences button.
There are three styles available:


To set the button style, change the ‘data-count‘ parameter to ‘vertical’, ‘horizontal’, or ‘none’. Look at the default code:
<a href=”http://twitter.com/share” data-count=”horizontal” data-via=”newupdate”>Tweet</a><script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>

Now, how to add Tweet Button to WordPress blog?

Copy the following code and paste into your single or index page.
<a href=”http://twitter.com/share” data-text=”<?php the_title(); ?>” data-url=”<?php the_permalink() ?>” data-count=”vertical” data-via=”socialblogr“>Tweet</a><script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>

If you’re using WordPress.com, just enable the tweet button from your admin page.
Add Tweet Button to the Blogger template.
Copy of the Following code:
&lt;a href=&#39;http://twitter.com/share&#39; class=&#39;twitter-share-button&#39; data-text=&#39;<data:post.title/>&#39; data-url=&#39;<data:post.url/>&#39; data-count=&#39;vertical&#39; data-via=&#39;newsupdate&#39;&gt;Tweet&lt;/a&gt;<script src=’http://platform.twitter.com/widgets.js’ type=’text/javascript’/>

Add Tweet Button to Tumblr blog.
Copy of the Following code between {block:Posts} and {/block:Posts} :
<a href=”http://twitter.com/share” data-text=”{Title}” data-url=”{Permalink}” data-count=”vertical” data-via=”newsupdate“>Tweet</a><script type=”text/javascript” src=”http://platform.twitter.com/widgets.js”></script>

NOTE : Change the Twitter username (red-printed) with yours.
Share this article

0 comments:

Post a Comment

 
Copyright © 2014 News Update • All Rights Reserved.
back to top