Free & Open Source Web Resources
Posts tagged Twitter
How to add the official Tweet Button
Aug 13th
Twitter has just launched the “Tweet Button” an official option for web publishers to count retweets and let their readers easily share content.
It very easy to use, just copy and paste code is available for others to start implementing immediately.
Verical:
Tweet
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="aguspuryanto">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Horizontal:
Tweet
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="aguspuryanto">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
For WordPress users, just follow this instruction:
<!-- Inside the loop, for each post --> <a href="http://twitter.com/share?url=<?php print(urlencode(get_permalink())) ?>&text=<?php print(urlencode(get_the_title())) ?>" class="twitter-share-button" data-count="horizontal" data-via="aguspuryanto">Tweet</a> <!-- in your footer --> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Resources:
- http://mashable.com/2010/08/12/tweet-button-official/
- http://mir.aculo.us/2010/08/12/how-to-add-the-official-tweet-button-to-wordpress/
- http://dev.twitter.com/pages/tweet_button
- http://twitter.com/goodies/tweetbutton
