August 17, 2010

Few days back Twitter released their own version of Retweet button to counter the influence of Tweetmeme service . And lots of people are already migrating to Official Twitter button and removing the Tweetmeme button. So, in this tutorial, I will tell you how to add Official Twitter on homepage of your site .

Static HTML Sites:

If you want to add Twitter button to your static html site then go to Twitter Goodies and generate a code for your site .

For Adding Official Twitter button to Blogger Blogs :

To add Twitter button to your blogger blog ,follow these steps:

1) Login to blogger Dashboard .

2) Go to the Design -> Edit HTML of your blog.

3) Now click on the check box .

4) Search for <data:post.body/>

5) Now add the below code on either above it or below, depending on where you want it to display the Twitter Button .

<div style="float:left;padding:4px;">
<a href='http://twitter.com/share' rel='nofollow' class='twitter-share-button' expr:data-url='data:post.url' expr:data-text='data:post.title' data-related='Computer Talks' data-count='vertical' data-via='theworldwinner'  data-lang='en'>Tweet</a>
<b:if cond='data:post.isFirstPost'>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js">
</script>
</b:if>
</div>

6) Edit the code to put your username in the data-via part and also edit the data-related part as per your convenience.

For adding Official Twitter Button on WordPress Homepage:

You need to follow the following steps to put official Twitter Button anywhere on your wordpress blog  .

1) You can the Twitter button on your Index.php, archive.php ,single.php or anywhere you want .

2) Copy the code given below and paste it on your blog .

<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
   <a href="http://twitter.com/share" class="twitter-share-button"
      data-url="<?php the_permalink(); ?>"
      data-via="theworldwinner"
      data-text="<?php the_title(); ?>"
      data-related="comptalks"
      data-count="horizontal">Tweet</a>

3) Lots of people where having problems while adding official twitter button to their wordpress homepage . Hopefully,this will solve their. You can see the demo on this blog’s homepage .

Suggestions and comments are always welcome .



If you have any computer related problem, you can ask it at our Question & Answer portal and our experts will answer your queries.

About

Bishwajeet Mahato is the Founder and CEO of Comptalks, an online portal and offline college magazine.He is a fifth year undergraduate student of IIT Kharagpur,India and he loves writing about technology and helps people solve their computer related problems. Nowadays, he is also interested in digital marketing and has worked for several top notch companies. Follow him on Twitter @mahato99

Comments:
  1. Wow, thanks a lot these handy tips. You saved my day.

  2. glad that you found it useful :)

  3. What a perfect button. I replaced the tweetmeme button with this one on my blog. :)

  4. Aw, this was a truly top quality publish. In theory I’d like to write like this too – taking time and real effort to make a really good posting… but what can I say… I procrastinate alot and by no means seem to obtain something done.

  5. What about adding one of the official twitter share buttons to a wordpress blog? One that is self hosted, do you know how to?

    thakns

  6. this is for self hosted blogs only,try it on your blog

  7. I posted a similar technique for my WordPress blog, it’s a shame that Twitter haven’t come up with an “official” plugin for the various blogging platforms yet!

  8. see official plugin will have lots of issues ,like we cant customize it according to our need

    Copyright © 2011 Comptalks - All Rights Reserved.