It is Friday and we don’t want to read long posts and tutorials. So today’s post is going to be short and sweet. I’ve been playing a lot with Twitter lately. I wrote some jQuery and javascript functions that get user details, etc. I will share it with you next week.
But for today, I would like to share Twitter’s JSON and JSONP API URL. I am sharing it because it was hard to find it first. I actually wrote a jQuery plugin that gets Twitter user details using my previous post on cross site AJAX querying method. All Twitter API usage tutorials and articles I found on internet were based on RESTful non JSONP API, so I though I'll share Twitter JSON(P) API with you. Anyway...
Twitter JSON(P) API URL:
http://twitter.com/status/user_timeline/USERNAME.json?count=10 &callback=JSONPcallbackFunction
Here is a code to use with jQuery’s $.getJSON()
function:
http://twitter.com/status/user_timeline/USERNAME.json?count=10 &callback=?
We have put ?
(question mark) for callback function name so jQuery could replace it with a dynamic one that it has created.
Update: Check out jQuery Twitter API plugin – jTwitter, that uses this Twitter API.