135 Add a Customized Twitter Widget to your Blogger Blog
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.

135 Comments:

22 April 2008 22:01 podxien said...

Hi Amanda!
great great post!
Spot on as usual!

22 April 2008 23:02 tieTYT said...

good article, thanks

23 April 2008 04:24 MsPinkBiik said...

Hi Amanda
This is another amazing widget. Although I was able to add one before on my site but it kept my screen freezing and stops my sidebar to load. Do you know what could be wrong?
Thanks for your tips and help.

BTW I am now using your blue steel template. Please let me know what you think.

23 April 2008 10:41 Massimiliano Forastieri said...

Thanks a lot for your widget from Italy :-D

24 April 2008 10:08 Jean Chia said...

this is great! but do u have the bird in pink color?

25 April 2008 22:16 Amanda said...

For Podxien and Tietyt: Thank you for your kind comments, I'm glad you have found this helpful :)

For MsPinkBiik:

I love how you've used the Blue Steel template! As far as I can tell the Twitter widget should work just fine. It may be that Twitter was acting up again (sometimes the server goes down in which case it takes AGES for my header section to load).

You could try adding this again, but do let me know if it still doesn't work for you and I'll check your blog to see what could be wrong.

For Massimiliano Forastieri:

Thank you for stopping by! It's great to know this widget has been useful for you too.

For Jean Chia:

I don't have a pink one to hand, but feel free to grab the image if you'd prefer to alter this in your favorite image editor :)

28 April 2008 10:03 Jean Chia said...

hi amanda! oh great! thanks for giving me the permission even tho' i doubt that i can turn the bird to pink color. thanks again, amanda! you are simply the best!

1 May 2008 15:39 Jim Roeg said...

Thank you! Looks great.

19 May 2008 09:41 Tom said...

Hi there,

Thanks for this, I have added it to my blog.

One thing: I don't want the image gif to be hosted by your server, I'd prefer it to be uploaded onto my website.

Do you know how to change the coding so I can upload a picture instead of pointing to a URL?

24 May 2008 14:31 D said...

Is there any easy css coding to move this widget to the top right of my blog (similar positions to what you have)?

Thanks,
D

7 June 2008 17:38 Xinu said...

Thanks Amanda! This is awesome. The widget looks so much cleaner and more professional on my site now. Great tip!

15 June 2008 16:35 Threeundertwo said...

This is great. Can you tell us how to create a "follow" me link with it?

23 June 2008 14:28 .:Carola }i{:. said...

Thank you so much, it was great help!

25 June 2008 07:47 mummey said...

Thank you. All I needed was the border, and I didn't feel like relearning CSS again just for that.

Cheers,
-b

29 June 2008 23:17 Vanessa said...

Thanks Amanda for another blogger.com resource. I have to say ditto about not pulling on your server with the image. I was feeling lazy about going into CSS to change anything. I'll figure out something.

22 July 2008 18:39 Anurag Bansal said...

Hi Amanda,
I am trying to put it in my blog header as that's an empty space I would like to utilize with twitter.
Do you have some CSS edit handy so that I can place it in header instead of the sidebar.

Thanks
I appreciate any help in this regard.

31 July 2008 15:27 Anurag Bansal said...

Thanks Amanda,
I was able to modify the twitter widget with your help.
I appreciate all your help.
You are really a Blogger BUSTER.
BTW, how is your back now? Hope you are doing good.

Take care...

31 July 2008 20:19 Jesse said...

Hmm, I'm running into trouble with my tweet's line spacing. It's all close together. I'm no code / CSS expert and have tried in futility for the past 45 minutes at least to fix it. Yours is the best link I've found, but I still couldn't get the lines to be unjumbled. Any help you can give would be greatly appreciated!!

The blog address is watchlistenshare.blogspot.com

1 September 2008 01:59 Curtis said...

I found this widget today and it fits perfecty in my blog. Thank you.

11 September 2008 06:04 Lyndi said...

Hey that was awesome! The best little twitter widget I have seen, so simple too. Thank you for doing the hard work!

17 September 2008 08:57 Madhav Tripathi said...

Thanks Amanda, I just search at Google for twitter follow code and come at your blog and got help!

28 September 2008 01:21 Faiqa said...

I just discovered your blog!! You're amazing, thanks for this!

8 October 2008 03:03 Teal Marie Chimblo said...

Thanks alot!Appreciate your post. Love it and added to all my blogs...
http://blissfulbodyoga.blogspot.com
http://dailygratitudeblog.blogspot.com
http://tealdesigns.blogspot.com

17 October 2008 09:32 .:sanDORA:. said...

Thanks amanda.. now i can put my pic. beside my activity on twitter

25 November 2008 01:25 Andrew Altenburg said...

Thanks for the article... but the twitter widget is showing up in my blogger account but no tweets are coming through.. help??
andrewalt@aol.com

28 November 2008 23:38 Steve Oldner said...

Wow! This is really great stuff.

I have just discovered your site and now am you of your followers.

8 December 2008 17:10 Me, Myself &amp; I said...

got it too work but the bird looks.... ....well rubbish???

Will try again, thanks for the info ;)

22 December 2008 17:19 Pardes said...

You are a dear and a luv for posting such easy directions. It worked! Thanks!

28 December 2008 17:23 The Bee said...

Hey everyone! Is there anyway to make my Tweets appear as Blogspot posts? I want them to appear to similar to the way they feed into Tumblr.

14 January 2009 05:17 Peter McCartney said...

Hi Amanda. Dropping by to give you a big thank you for helping me out on this one. It certainly adds another human touch to any blog! Take Care, Peter

14 January 2009 23:24 Missy D said...

Awesome! Exactly what I was looking for - thanks ;)

20 January 2009 04:38 phycrewz said...

great!! tanx amanda..

7 February 2009 08:13
Anonymous said...

Very nice thank you

3 March 2009 06:01 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

3 March 2009 08:20 informationtypes said...

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

6 March 2009 08:47 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~~

6 March 2009 17:28 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

10 March 2009 20:50 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

11 March 2009 08:16 Madellaine Santiago said...

Thanks, very helpful :)

15 March 2009 02:59 offshore outsourcing said...

great thing
Thanks a lot

19 March 2009 20:31
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

21 March 2009 10:21 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/

21 March 2009 14:29 Trisha said...

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

24 March 2009 02:14 .:: AmRMrX ::. said...

thanxx amanda >> :)

26 March 2009 16:51 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

7 April 2009 21:12 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

13 April 2009 18:09 nanang said...

this is what I looking for. Great share!

16 April 2009 00:03 SpinDoctor said...

Thanks much. It works nicely

17 April 2009 20:13 The Fitness Diva said...

Okay, COOL! As always! :)

1 May 2009 03:24
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.

2 May 2009 16:18
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

11 May 2009 02:33 Sharingan616 said...

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

11 May 2009 12:16 Offshore Outsourcing said...

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

12 May 2009 22:48 tarkeeyo said...

Thanks a bunch for your tips. From Malaysia.

13 May 2009 18:18 Text Messages said...

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

17 May 2009 16:08 ksavip said...

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

19 May 2009 13:25 miamihero said...

hi, thanks for this :)
love it!

21 May 2009 11:21 Anonymous from hell said...

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

26 May 2009 14:41 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?

8 June 2009 04:50 Brian Steuhl said...

Thanks for the twitter image URL

11 June 2009 18:20 Julieta Paganini said...

Muy bueno!
Really great!

14 June 2009 17:51 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....

15 June 2009 00:26 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.

20 June 2009 15:48 Snoop said...

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

28 June 2009 08:20 rakasya said...

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

29 June 2009 02:24 reynante said...

Thanks! ^_^ Helped a lot.

29 June 2009 03:00 Mohammed said...

Cool stuffs ,thank you for the share.

29 June 2009 22:48 mysocialsite said...

Thanks for the useful information.

30 June 2009 05:20 drivers said...

nice posting, thanks

3 July 2009 09:14 Cornel M said...

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

4 July 2009 00:42 Sashindoubutsu said...

thank you so much for sharing...^^

7 July 2009 21:57 Cornel M said...

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

11 July 2009 18:32 Gareth Williams said...

Cheers, thanks for sharing

13 July 2009 13:30 Tommy Salami said...

nice little widget. thanks.

14 July 2009 14:59 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!

16 July 2009 21:01 HealthyHoustonKids said...

Thanks for the very clear instructions! Appreciate it tremendously.

24 July 2009 16:01 Jana said...

Awesome! Thanks so much!

28 July 2009 06:42 paper olive said...

this is FABULOUS! thank you!

31 July 2009 22:42 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?

2 August 2009 22:58 nusret said...

thanks for article very

4 August 2009 15:03 Gil Bouhnick said...

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

13 August 2009 11:16 aidha said...

thank you very much

13 August 2009 17:40 Twitter Traffic Marketing said...

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

14 August 2009 12:03 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?

15 August 2009 20:52 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

23 August 2009 19:07 Asheerq said...

Thanks for the useful information.

thanx alot

2 September 2009 16:42 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 ?

6 September 2009 15:16 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

6 September 2009 22:37 Yoga online said...

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

10 September 2009 00:03 الخفجي said...

Thanks for the useful information.

18 September 2009 04:31 Dumaguete Travelista said...

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

26 September 2009 04:13 sylvain foucault said...

Thanks for the widget, i found you on google and working on my blog !!

2 October 2009 23:10 karen13 said...

Amazing widget!

thanks!

7 October 2009 05:20 Twitter tips and more said...

Great tip on the widgets and great technical advice.

Here's how to add tons of Twitter followers fast and effectively to you Twitter account: Take your Twitter account viral and add hundreds of followers overnight!

13 October 2009 08:00
Anonymous said...

Thanks!
i've added to
www.hclmelaptop.blogspot.com

17 October 2009 05:13 tracy gomez said...

This is great. Thanks for posting.

I noticed that after I put in the widget, whenever someone visits my page they are prompt of a twitter name and password. Is this because I chose to "protect" my tweets in my twitter account?

I'd appreciate you help :)

18 October 2009 11:37 Nauli said...

Hi! I'm using your widget on my blog now. Thanks!

3 November 2009 04:52 james said...

Really a great tool. thanks

4 November 2009 04:55 RiotAJ said...

In your comment that says "Add style here", you forgot an ! to complete the HTML comment.

A friendly heads up just in case anyone was going to copy that html.

Cheers,

-Adam

17 November 2009 12:42 Graham Wilson said...

Is there a way of filtering tweets by hashtag or keyword as well as by usedid? Thanks, Graham.

21 November 2009 08:48 free twitter buttons said...

Great information Thanks

29 November 2009 21:25
Anonymous said...

Thank you so so so so much for posting this! I've been looking all over for a simple way to add a self-stylized badge to my website without a lot of crazy extra features that I don't need.

29 November 2009 21:39
Anonymous said...

Just wanted to know if there's anyway to remove the "days ago" link (for example "25 days ago") or stylize this in-line?

3 December 2009 02:22 dina tsh said...

thank you so much. it works.

3 December 2009 14:25 seslialmanya said...

helloo how are you selam nasılsınız arkadaşlar

6 December 2009 14:58 bagus said...

nice site with usefull tips, thanks

http://netbookspot.co.cc

18 December 2009 19:54 Maya said...

Great tip! Thanks so much:)

19 December 2009 22:51 OnlineBrokerReview said...

I tried a number of pre-built twitter gadgets but just couldn't find one that blended in well with my blogs and did not take up too much space. As an alternative, I found some javascript code online and added some new features that delivers exactly what I wanted. You can see an example of it at http://onlinebrokerreview.blogspot.com/.

To add this code yourself, simply create a new gadget in blogger of type text/javascript, cut and paste the below code and replace my twitter user name (onlinebrokerrev) with your own. You then have a lot of configuration options. Get the full code at http://pastebin.com/f58a63cd3

20 December 2009 19:27 Wesley Soccer said...

Works great on my site...I just switch around the image to right...Let me know your thoughts everyone and leave comments at my site...www.wesleysoccerblog.com

21 December 2009 10:18 Actor Andrew said...

Is there a way to filter the timeline so it will filter out all tweets with an @ symbol. I would like it so my blog will display things I say about me, not what I say to others

3 January 2010 13:43
Anonymous said...

Hi,

thanks for the information. It worked, (:

9 January 2010 20:53 shopinsummer said...

awesome...its working...thanks

23 January 2010 17:11 blogger said...

Thanks for shearing !
Nice info!!!
I would love to add in my sites

http://www.Getexaminfo.blogspot.com

http://www.indoexams.blogspot.com

25 January 2010 13:30 Silla said...

Thanks so much for this! The twitter widget in the blogger library didn't show with the same style as the rest of my widgets, so this is very useful for me.

However, one thing I really liked about the one in the blogger library was the square bullet next to each tweet. I have tried to add it to your code myself but I can't get it right. Can you help me?

Another thing I am having trouble with is the width of the tweets - they are slightly too wide for my sidebar, so the words on the right are always cut off. Any help would be greatly appreciated! Thank you.

3 February 2010 09:44 Jeny said...

This is really great and informative article. thanks for it.

twitter follower adder

8 February 2010 02:20 healthy society said...

nice tips, very useful article. thanks

11 February 2010 03:58 David Michael said...

That Twitter widget is a good idea. Now if I can figure out how to install it on my site.

Great site, Thanks for the helpful tips.

11 February 2010 10:52 Shilpa said...

I really enjoyed thank you!!!!!!!!
DUI Helps

28 February 2010 00:23 TopSpin said...

I've lost count of how many times I've used your tips and widgets.

Many many thanks!

26 March 2010 07:20 Volusion Developers said...

Thank you very much for sharing this. I was looking for this.

26 March 2010 07:24 Puppy Training Tips said...

Thank you very much. I will sure use it and put a link back to this post , so that others can take benefit.

24 April 2010 05:15 -=K=- said...

"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." -- Im sorry but I cant seem to find the form you were referring to. I would like to update the twitter widget in my blog. Please help me :)Thanks

myunpurethoughts.blogspot.com

5 May 2010 12:50 PSD to Wordpress said...

Thank you very much for sharing this. I was looking for this.

13 May 2010 17:14 Data Recovery said...

This twitter widget is really helpful, I would surely like to add this.

25 May 2010 02:40 seslitel said...

Google PageRank value and the high / www.css3.info good continuation of the success of a site

25 May 2010 02:44 diyar47 said...

Google PageRank value of a good site bloggerbuster.com have continued success

13 June 2010 18:39 besma(lucy) said...

Great post, really helped, thanks.

Just wanted to point out you can also change the font of the text by adding bold or italic codes around the <[ul] id="twitter_update_list"><[/ul]> part (minus the [ ]'s).

I also wanted to know if there was a way of getting rid of the indent I seem to have on my Twitter widget - the first line of text is fine but the rest appears to move to the right by a couple of px. Why is this - and how can I stop it?!

My blog: http://bnjrmlle.blogspot.com

Thanks again.

Post a Comment

Browse through the Archives

All existing posts are still available to view while I'm working on the site, albeit seen in a much simpler interface. Feel free to browse through the archives to find tutorials, templates and articles to help you build a better blog:

Blog Archive

© Blogger Buster 2010 Home | About | Contact | Hire Me