7
Posted on 4:17 AM by prajeesh and filed under ,
Sometimes you may be want to show your latest twitter tweets in your website or blog, most of the cases you are doing this by using widgets with limited customization facilities and showing ads or links to other websites, here is an easier way to achieve this using twitter API and javascript.
Step 1:
First, decide where about on your page you want your last tweet to display. Then paste following html code there.
Step 2:
Next you need to put these 2 lines of JavaScript below the code in step 1. On the 2nd line of code where it says prajeeshkk.json, you need to replace prajeeshkk with your twitter username.

Step 3:(Optional)
You can apply css and make the div displaying the tweet stylish.


See how my tweet design looks :

Shout it kick it on DotNetKicks.com
7
Responses to ... How to display latest tweet in your website using Javascript and twitter API
Steve Smith said... November 1, 2009 at 12:00 PM

Great code. Works fine for me except I'd really like the 'about 5 mins ago' text to be on the next line, how can I do that?

Anonymous said... January 6, 2010 at 4:07 AM

@Steve - Do the following change to the CSS

#twitter_update_list span a
{
display: block;
color: #008080;
}

Anonymous said... February 17, 2010 at 5:16 AM

Would it be possible to limit the width. I use your code in a table with a background image. I dont want to have the text / tweets runing out of the background image.

Thx
Rick

Unknown said... July 12, 2010 at 11:39 PM

you can refer to this site on how to display the latest tweets in your site using twitter API..

as easy as 1 2 3

http://www.ryscript.co.cc/web/how-to-display-latest-tweets-using-javascript-and-twitter-api/

thanks

Unknown said... July 19, 2010 at 6:02 AM

Is there any way to remove the image/box at the top?

Unknown said... August 7, 2010 at 3:42 AM

Hello,

thanks for the code. What can I do to make the text itself a link and not to display actual URL? The 'about 5 mis ago' would be behind the text...

Thanks a lot!

kmk said... November 25, 2010 at 4:31 AM

Whether it is possible to show tweets which are posted in past three months?