Guys! Here is simple twitter client (with very limited functionality) which I created as a final assignment for “Mobile Module” at USQ. This whole application is written in Javascript on Titanium platform which allows us to create “Android app”, “iPhone app” and “BlackBerry app” by using only one language “Javascript”. You can get the full source code from this Git repository.
- Git URL : https://github.com/michaelsync/USQTweet
- Help Viewer: http://michaelsync.net/usqtweet/help/
USQTweet – Simple Twitter App
Description
USQTweet is a simple tweet client application that is created for Mobile Module in USQ. You can use this application to view the latest tweet posted by you and people that you are following on your Android phone.

Features
- Login with existing twitter account
- View the latest tweets on mobile phone
Technical
- oAuth 1.0
- Network I/O
- Dual orientation GUI
- File API: Persistent storage using File ( “Isolated storage” style)
- Web View for Twitter authentication process (oAuth) and help file viewer
- Rail-style naming conventing.
- Comment style : YUI Doc
- Titanium (I’m using 1.2)
- Android SDK
Requirements
- This application needs live internet connection.
- You need to have an existing twitter account. (Note to Examiners: I emailed my twitter account details to my teacher “Stijn Dekeyser”. If you don’t have an existing twitter account and don’t want to create new one then you can get my account from Mr-Dekeyser. Please don’t share with other.
Known issues
- If there is some errors in connection or etc, the application won’t let the users know about the problem. You will have to check the debug log in Titanium Console manully and will need to restart the application.
- If you close the web view popup, there is no way to re-open it so you will have to re-run the application.
- WebView is just a small browser in application but it’s not so easy to nevigate so it’s better not to click other links.
- Additional to #1, there is no global exception handling. 5.
- The application will store the access token once you authorized the application. So, it will not ask you to enter username/pwd or authorize again later. But the problem is that when you revoke the access from twitter site but you will have the access token that you have saved earlier in device then you will get the error. You need to clear the application data.
- access token should not be stored in plain format.
- If your tweet is so long then you won’t be able to see the completed text on the screen. I tried positing the text and alignment but using height:’auto’ in one control and specific height in another control doesn’t work well in Titanium.
- You won’t be able to post anything to twitter as well. I posted about this in forum but I haven’t received any reply on this yet.
Reference ~
- Using OAuth 1.0a (https://dev.twitter.com/docs/auth/oauth)
- Twitter REST API (https://dev.twitter.com/docs/api)
- John Kristian’s Javascript Library (http://oauth.googlecode.com/svn/code/javascript/) Note: I’m using sha1.js and oauth.js from his library.
- oauth-adapter (http://code.google.com/p/oauth-adapter/) Note: I didn’t use this library but I looked at the code to understand how things works.







