How to show Twitter updates on Blogger

| 9 comments

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, Favorites, List, Search and #hashtag widgets.

The following steps will display your profile updates. It will display you public timeline similar to the live example on the right. 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, your blog domain 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 for reference, using the old script)

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?

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

Suzanne 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.

Mike Churchward March 23, 2013 at 1:33 AM    

Thanks!

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. Then paste the escaped code here. For personalized help, you can HIRE ME.

Click to go to top Click to comment