63 Add a Customized Twitter Widget to your Blogger Blog
Tuesday, April 22, 2008 /

Twitter LogoTwitter has become one of the most useful social applications for bloggers. Many bloggers choose to feature their latest updates in a widget visible in their blogs. Here at Blogger Buster, for example, you can see a Twitter widget in the header section which features my latest "tweet".

Many readers have emailed me to ask how I customized this widget, so in this post I'll explain some methods you could use to create and customize your own Twitter updates widget, including a simple widget installer for you to add a widget similar to the one used here.






Twitter does offer a "Blogger" widget which can be installed using a one-click installer. This widget does not have any styling associated with it, ensuring your updates will appear in the same fonts and colors as other widgets in your blog.

If you have already added a Twitter widget to your blog, you can easily customize the appearance of this widget using some simple CSS techniques.

The widget code for your Twitter badge will most likely appear like this:

<div <--Add Style Here --> id="twitter_div"><ul id="twitter_update_list"></ul>

<a id="twitter-link" style="display:block;text-align:right;" href="http://twitter.com/amandafazani">follow me on Twitter</a>

</div>

<script src="http://twitter.com/javascripts/blogger.js" type="text/javascript"></script>

<script src="http://twitter.com/statuses/user_timeline/amandafazani.json?callback=twitterCallback2&count=5" type="text/javascript"></script>

As you can see from the comments I added in red, you can add inline CSS styling to your widget code, in order to add borders, background color or even an easily recognizable icon.

Here are some examples of the code you can add in this section:

style="border: 3px solid #cccccc; padding: 5px;" <--This will add a wide grey border around the widget with some padding to ensure the text doesn't get too close to the edges.

style="background: #ffcc00;" <-- This will add a bright yellow background to the widget, ensuring this contrasts with other elements in the page.

style="background: url(http://imagehost.com/youricon.jpg) top left no-repeat; padding-left: 50px;" <--This will add an icon as a background image to your widget. The padding declaration ensures the text does not overlap the icon (this is the solution I use to feature the blue bird in my Twitter icon in the header section).

To add these style declarations into your Twitter widget, simply go to Layout>Page Elements in your Blogger dashboard and click on the "Edit" link for your Twitter widget. Then locate the section of code which begins like this:

<div id="twitter_div"

and add your styling code to this section.

Here is an example of the Twitter widget code with style declarations added in red:

<div style="background: url(http://bloggerbuster.com/images/twitter-icon.gif) top left no-repeat; padding-left: 50px;" id="twitter_div"><ul id="twitter_update_list"></ul>

<a id="twitter-link" style="display:block;text-align:right;" href="http://twitter.com/amandafazani">follow me on Twitter</a>

</div>

<script src="http://twitter.com/javascripts/blogger.js" type="text/javascript"></script>

<script src="http://twitter.com/statuses/user_timeline/amandafazani.json?callback=twitterCallback2&count=5" type="text/javascript"></script>

Add a Twitter Widget using this Widget Installer

For those of you who would prefer a simple method of adding a stylized Twitter widget to your Blogger powered blog, here is a widget installer which will add a widget with an easily recognizable "Twitterific" icon, like this:

The colors and fonts of this widget will blend with other elements of your blog, while the Twitterific icon will be easily recognized and help your readers associate this widget with Twitter.

To add this widget to your blog, simply fill in the details in the form below. Your Twitter username is the one which you have chosen to represent you on Twitter. For example, my username us "amandafazani" and my Twitter URL is http://twitter.com/amandafazani. Add this username into the appropriate box, then change the title and number of tweets to display as suited to your needs.

I hope this post has been informative in explaining how you can add style to your Twitter badge/widget in your Blogger blog. Please let me know what you think by leaving your comments below.


63 comments:

February 7, 2009 at 12:13 AM
Anonymous said...

Very nice thank you

March 2, 2009 at 10:01 PM Salem Man said...

Amanda, I use your page all the time, it's the best. Is there any way to put multiple people's tweets on the same site. eatsalem.com

March 3, 2009 at 12:20 AM informationtypes said...

landed from google, thanks for the great info.
Information Review

March 6, 2009 at 12:47 AM firdaus zahari a.k.a FaKE said...

thanks amanda..this is just the right post that i been looking for..now my blog http://www.efzec.com looks great.all thanks to most of your tutorials..cheers~~

March 6, 2009 at 9:28 AM Thomas said...

I really do not like social networking but it represent a great tool for promoting. So thank you for help.

www.computorial.blogspot.com

March 10, 2009 at 1:50 PM Heather España said...

Thanks! This is awesome, but there is a kink I haven't been able to fix. I have my background image for the Widget, but the heigth of it changes depending on how much I type into Twitter. Is there a code I can insert that will make the background image stay the same dimensions regardless of how many letters I type into Twitter? Please help! :-)
heather@espanaphotography.com
http://www.espanaphotographyblog.com

March 11, 2009 at 1:16 AM
Madz said...

Thanks, very helpful :)

March 19, 2009 at 1:31 PM
Anonymous said...

thanks this is great! but do you know how to limit the number of tweets it shows on the blog? it just keeps on going like the ever ready bunny pushing down all the other widgets into the wild deep... i'de rather it only post the last 5 or so... hmmm... any thoughts most appreciated.

thanks, And

March 21, 2009 at 3:21 AM maitaiinjapan said...

Hi Amanda,

I'm having problems with trying to adjust line spacing and paragraph spacing. Would you help me out please? Thank you!

My site is: http://maitaiinjapan.blogspot.com/

March 21, 2009 at 7:29 AM Trisha said...

Yippee! I did it - with your awesome help! Thanks so much!

March 26, 2009 at 9:51 AM luisj said...

Great!
but how can I show only one twitter message?
I thought that this could be done by the &count=1 variable, but 5 twitter messages continue to appear at my blog widget.
Can someone help?
Thank you very much.
http://webdoispontozeroplus.blogspot.com

April 7, 2009 at 1:12 PM Tim said...

This is great but how do i make the twitter updates go to the right?

I understand how to add another widget to the header but not make i go right.

hope you understand me and can help thanks

April 13, 2009 at 10:09 AM nanang said...

this is what I looking for. Great share!

April 15, 2009 at 4:03 PM Spin Doctor said...

Thanks much. It works nicely

April 17, 2009 at 12:13 PM The Fitness Diva said...

Okay, COOL! As always! :)

April 30, 2009 at 7:24 PM
GretaY said...

Thanks for sharing these relevant information! However, have you ever heard that twitter is now breaking down the wall of separation between celebrities and their fans? Yes, that’s right! Twitter, the social networking site, and cyberspace phenomenon, has been utilized by personalities such as Ashton Kutcher and wife Demi Moore, the director Kevin Smith, singer Lily Allen, and LaVar Burton, the actor known for his role on Star Trek as Geordie the engineer, as well as host of the Reading Rainbow and his role in Alex Haley's Roots. Users post updates, whatever they want to say, questions and answers, in 140 word clips called Tweets. Membership is free, so you don't have to get installment loans to get onto Twitter.

May 2, 2009 at 8:18 AM
increase twitter followers said...

 manage twitter followers
The Completely Automated Twitter Growth & Money Making System for People that Want to Set Up A System ONCE, Forget About It, and Have it Grow and Make Money EVERY Day!
http://875f81xab56p9w8aqfx7183x0f.hop.clickbank.net

May 10, 2009 at 6:33 PM Sharingan616 said...

cool. is there any way you can turn it around and have your blogger blogs appear on twitter?

May 11, 2009 at 4:16 AM Offshore Outsourcing said...

An excellent post....thanks for sharing your nice work.

May 12, 2009 at 2:48 PM Lopsided Oreo said...

Thanks a bunch for your tips. From Malaysia.

May 13, 2009 at 10:18 AM Text Messages said...

Really breathtaking further informative topic. Thank you seeing sharing this.

May 17, 2009 at 8:08 AM ksavip said...

thaaaaanks
http://www.kh-girl.com

May 19, 2009 at 5:25 AM miamihero said...

hi, thanks for this :)
love it!

May 21, 2009 at 3:21 AM Et said...

Thanks ! But not work with me :D
http://nqhuy.net

May 26, 2009 at 6:41 AM N. Zero said...

I'm happy with the Twitter widget I have. What's the difference between this gadget and the one I already have on my blog?

June 7, 2009 at 8:50 PM Brian Steuhl said...

Thanks for the twitter image URL

June 14, 2009 at 9:51 AM ShowerOfMoney said...

Hi,
I have gone through ur post.You are imparting knowledge no doubt....Don't be so clever and cunning.Don't cheat reader.........In ur code,that is ur twitter page that will enhance ur website rank not person using ur mentioned code....

June 14, 2009 at 4:26 PM Robert Loerzel said...

Is there a way to customize the Twitter badge on my Blogger page so that it doesn't include the Tweets I post in response to other people's Tweets (the ones that start with a @...)?

It seems like Twitter has changed its policy lately so that people don't see those Tweets on my Twitter page unless they're following both me and the person I'm responding to. Am I correct about that?

But those sorts of posts are still showing up in the Twitter badge on my blog. I think it's sort of confusing for people to say my responses to people there without seeing what I'm responding to, so I'd love to filter out those Tweets if possible.

June 20, 2009 at 7:48 AM Snoop said...

I like your widgets there is another twitter widget but this one is more attractive. NIce desing

June 20, 2009 at 2:45 PM
Impolite said...

Love it!

June 28, 2009 at 12:20 AM rakasya said...

uffh.. finally i found what i need .. thx alot

June 28, 2009 at 6:24 PM reynante said...

Thanks! ^_^ Helped a lot.

June 28, 2009 at 7:00 PM Mohammed said...

Cool stuffs ,thank you for the share.

June 29, 2009 at 2:48 PM mysocialsite said...

Thanks for the useful information.

June 29, 2009 at 9:20 PM admin said...

nice posting, thanks

July 3, 2009 at 1:14 AM Cornel M said...

Visit my page: http://itassist.blogspot.com - FREE Computer Assistance and Advisory

July 3, 2009 at 4:42 PM Sashindoubutsu said...

thank you so much for sharing...^^

July 7, 2009 at 1:57 PM Cornel M said...

Te astept pe blogul meu: http://itassist.blogspot.com - Asistenta si Consultanta GRATUITA IT

July 11, 2009 at 10:32 AM Gareth Williams said...

Cheers, thanks for sharing

July 13, 2009 at 5:30 AM Tommy Salami said...

nice little widget. thanks.

July 14, 2009 at 6:59 AM indianpedi said...

Thank you.... I used your Blog's help to add a widget to my Blog and the little blue bird looks CUTE!
Thanks, again!

July 16, 2009 at 1:01 PM HealthyHoustonKids said...

Thanks for the very clear instructions! Appreciate it tremendously.

July 24, 2009 at 8:01 AM Jana said...

Awesome! Thanks so much!

July 27, 2009 at 10:42 PM paper olive said...

this is FABULOUS! thank you!

July 31, 2009 at 2:42 PM craig p said...

Did anyone answer @Robert Loerzel above because I want to know that answer too! How do we get direct messages and retweets out of the widget?

August 2, 2009 at 2:58 PM nusret said...

thanks for article very

August 4, 2009 at 7:03 AM Gil Bouhnick said...

Thanks for the tip.
I managed to embed the badge to my posts:
MobileSpoon

August 13, 2009 at 3:16 AM aidha said...

thank you very much

August 13, 2009 at 9:40 AM Twitter Traffic Marketing said...

that's is really good article.. people always looking for easy way to get latest update with twitter..

August 14, 2009 at 4:03 AM Emm said...

Hi Amanda. Great post (I found you through Google). Do you know how I can format it just to bring through tweets and not replies?

August 15, 2009 at 12:52 PM Amit Mishra said...

It's awesome. I was in search of this scrip for long days. finally i got this scrip here.

Thanks thanks thanks

August 23, 2009 at 11:07 AM Asheerq said...

Thanks for the useful information.

thanx alot

September 2, 2009 at 8:42 AM
Jeff said...

I'm trying to install more than one twitter widget in my blogger blog but it doesn't work. It just load the first widget and the two others are out.

Can you help me please ?

September 6, 2009 at 7:16 AM drmartyr said...

Hello,Ma'am i have tried to place this widget in my blog,but the widget is not showing my recent updates.If possible would you please help,the link is http://bestsurfer.blogspot.com/2009/09/representative-post.html

September 6, 2009 at 2:37 PM Yoga online said...

It's a great idea to put that widget in a blog.

September 9, 2009 at 4:03 PM الخفجي said...

Thanks for the useful information.

September 17, 2009 at 8:31 PM Dumaguete Travelista said...

It worked! Very helpful tip... Thanks a lot!

Post a Comment