Twitter API - check if username exists
It seems that I can pass screenname in the user search API. And I have to check for 404 not found status (if username does not exist). Seems a bit ugly, but might just work. Better suggestions welcome!
this gives 404: http://api.twitter.com/1/users/show.xml?screen_name=thisdoesnotexist1234abxfd
this returns valid info: http://api.twitter.com/1/users/show.xml?screen_name=billgates
thanks
JP
EDIT
The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.