A Simple Twitter Client in AIR
November 16, 2008
Posted by on
In our continued examples, I was asked to have an example of a simple Twitter Client. Twitter, for those of you who do not know of the service, is a ‘micro-blogging’ service which allows users to post short, 140 character messages. Your messages get aggregated with by your followers, and mixed in with anybody else they follow. If you want to see my ‘Twitter Feed’, you can go to http://twitter.com/quetwo . If you would like to see how to work with the Twitter API, you can visit their WIKI.
This example is an AIR app, so, unfortunately, you will not be able to view it live in the browser. You can download the final .AIR file (and install on your PC) HERE.
A link to the source code, and the source code download is available here.
This code shows how to connect to RESTful services and deal with XML data. In the example, I have implemented two of the many APIs available — the ‘get friends timeline’, which is used to get your friend’s tweets. and one to update your own status. The implementation is very crude, but it is well commented.
This example uses the “Fair Reader” account for twitter. If you wish to use your own account, you need to edit the source code and put it in.
if you have any questions or comments about the implementation, please let me know in the comments 🙂