I am using the Twitter API to display the statuses of a user. However, in some cases (like today), Twitter goes down and takes all the APIs with it. Because of this, my application fails and continuously displays the loading screen.
I was wondering if there is a quick way (using PHP or JS) to query Twitter and see if it (and the API) is up. I’m thinking it could be an easy response of some sort.
Thanks in advance,
Phil
Request
http://api.twitter.com/1/help/test.xmlortest.json. Check to make sure you get a 200 http response code.If you requested XML the response should be:
The JSON response should be: