View Single Post
06-13-2009, 11:03 PM
#1
fredkelly is offline fredkelly
Status: I'm new around here
Join date: Jul 2008
Location:
Expertise:
Software:
 
Posts: 7
iTrader: 0 / 0%
 

fredkelly is on a distinguished road

  Old  jQuery and Twitter

Hi There,

I'm trying to make a simple script to get my most recent twitter update using jQuery and the twitter API. The simple function I have is below:

Code:
function get_twitter() {
	$.getJSON("http://twitter.com/statuses/user_timeline/fredkelly.json?count=1&callback=?", function (data){
	  	alert(data);
	});
}
This currently returns '[Object] object' or similar. I think I need to decode the response and then somehow select parts of the response e.g. text and date of the message - but I'm not sure how to go about this.

Could anyone offer some help - I'm not sure if I'm going about this in the right way at all!

Cheers,
Fred

Reply With Quote