Spritzer your Twitter – Mea Cup O' Jo
Skip to content


Spritzer your Twitter

I know, I know – it’s probably old news but I just discover Twitter’s streaming API. For these of you who is not in the know or how: anyone with valid Twitter account can monitor Twitter public postings in realtime. It may not get regular users excited but for developers – imaging you are eavesdropping on the whole world! You can get it in compact JSON format or more elaborate XML but generally it will look as long sequence of the following single snippet



  Thu Jul 30 16:28:23 +0000 2009
  2932899702
  @shonda305 @msmayad sore throat
  <a href="http://www.twhirl.org/">twhirl</a>
false
  
  38761568
  false
  shonda305
  
    18806564
    jazzyattitude
    jazzyattitude
    Florida 
    one of a kind
http://s3.amazonaws.com/twitter_production/profile_images/333149534/DSC00347_normal.JPG
    
false
    85
709397
333333
FF3300
A0C5C7
86A4A6
    43
    Fri Jan 09 16:54:26 +0000 2009
    0
    -18000
    Eastern Time (US & Canada)
http://static.twitter.com/images/themes/theme6/bg.gif
false
    2469
    
    false
    
  

How did I get this? Get yourself a curl utility (if you on Win you can use this one) and run this command from the command prompt

% curl http://stream.twitter.com/spritzer.xml -uYOURUSERNAME:YOURPASSWORD

Note that YOURUSERNAME:YOURPASSWORD is just your regular Twitter user name/password – you don’t need to register dev account, nothing like that
You will now see long stream of XML snippets like one above. Change to spritzer.json and now you are streaming JSON

What to do with this? Hey – I have some ideas, you can get your own

Posted in Twitter.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.