How to show Twitter updates on Blogger

Previous I explained how to tweet blog posts into Twitter in Adding a “Tweet this” button into blog posts. Well this time it’s kind of the other way around.

We are going to make a widget that pulls your Twitter updates and embeds them on your blog. The content of the widget will be automatically updated every time you make a status update on Twitter.

Update: Twitter has come up with four new widgets: User timeline, Favorites, List, Search and Custom timeline.

The following steps will display your profile updates. It will display you public timeline similar to the live example here. The timeline is interactive and enable your visitors to reply, Retweet, and favorite Tweets directly from your blog.

  1. Visit Twitter's widgets page.
  2. Click Create New button on top right of the screen.
  3. Customize your widget -specify the widget’s height, theme, link color etc.
  4. Click Create Widget button at the bottom of the settings. The code for the widget will appear at the bottom left of your screen.
  5. Copy the code.
  6. On Blogger go to Layout, add a HTML/Javascript gadget, and paste the code in the content box.

(Below is the original tutorial (that no longer works) using the old script. This is for (my) reference only)

Installing (the old) Twitter updates widget

show twitter tweet updates on blog
  1. Login to your Blogger account.
  2. Go to Design > Page Elements.
  3. Click Add A Gadget.
  4. In Add A Gadget window, select HTML/Javascript .
  5. Enter the title of your widget e.g. Twitter Updates.
  6. Copy the code below and paste it inside the window.
  7. Click Save.

<div id="twitter_div">
<ul id="twitter_update_list"></ul>
<a href=http://twitter.com/YourTwitterUsername id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js">
</script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/YourTwitterUsername.json?callback=twitterCallback2
&amp;count=5">
</script>

Notice the highlighted lines in the code? That’s where you need to enter your own input:

  1. YourTwitterUsername –replace this with your Twitter username.
  2. count -replace 5 with the number of latest Twitter updates you want to show in your blog.

Styling the widget

As for formatting/styling, it will follow your blog sidebar styling. But if you want to customize it, you can use inline styling by inserting style attribute after <div in line 1 or you can create a separate element definition in CSS, like this: 

#twitter_div { 
/* add styling codes here here */ 
}

And place the it before ]]></b:skin> line in your HTML.

Enjoy!

p.s. Have you added a Twitter Follow button on your blog?

14 comments to "How to show Twitter updates on Blogger"

Suzanne Rowe July 9, 2010 at 1:12 PM    

is there any way to add my Twitter Feed but not have tweets that I @ someone show?

thanks!

Greenlava July 10, 2010 at 8:50 AM    

@Suzanne
Sorry, but I don't think that's possible.

spk March 2, 2011 at 3:35 PM    

can you tell me how to show tweets that I have re tweeted...

Greenlava March 8, 2011 at 3:59 PM    

@spk
Try Twitter's profile widget:
http://twitter.com/about/resources/widgets/widget_profile

Scarlett March 12, 2011 at 3:52 AM    

Hi there

I have used your guide to installing Twitter on my blog but for some reason the text of my twitter updates do not appear n my blog, instead there are the numbers 1-6. I just wondered if you might be able to help please? Also, is there anyway to get the little Twitte icon on my blog home page beside the Twitter update?

Many thanks!

Greenlava March 13, 2011 at 7:27 PM    

@Scarlett
Click the <> icon on the top right of the code. A pop-up will appear. Copy the code from there.

Zhou Si Ling October 29, 2012 at 4:01 PM    

What do I do after going to widget profile on twitter. I've to create a widget. I did and put it on my blog but it doesn't appear.

Greenlava November 5, 2012 at 9:39 AM    

@Zhou Si Ling
I've revised the tutorial. Please retry using the updated instructiond.

Anonymous,  March 23, 2013 at 1:33 AM    

Thanks!

Junaid December 21, 2013 at 12:07 AM    

Your Blog looks great. I have added twitter follow button at my website. Thanks

Unknown January 10, 2014 at 6:36 PM    

Thanks for your experience and update gadgets with the peoples but this is very hardly work because i have followed your step for twitter on blog but i am not success. So please reply any other option if be some points. thanks
http://www.mono-live.com/

panchayati January 22, 2014 at 2:36 PM    

thanks admin for sharing very Informative post, its very valueable tutorial

Unknown March 1, 2014 at 5:17 AM    

Thank you so much for sharing this information on how to add tweets on blogger soooooooo very helpful. Thank you!
www.marssyreese.com

MARIO March 29, 2014 at 9:21 PM    

Work perfect for me, thanks

Post a Comment

We love to hear from you! Leave us a comment.

To ensure proper display, HTML/XML/Javascript need to be escaped first using this escape tool.