Dec 25, 2009

Twitter Plugin for N900 Contacts and Conversations


Twitter plugin for N900 Contacts and Conversations tightly integrates Twitter to Maemo as an Instant Messaging (IM) protocol. After installed this plugin, you can configure multiple Twitter accounts and go online. It imports your Twitter friends and saved search queries to Contacts, and receives mentions/replies, as well as Twitter search results as conversation threads. In addition, you can send replies to any Twitter friend straight from Contacts, simply by tapping on their Twitter IDs.

1. Multiple Twitter Accounts Support

Open VoIP and IM accounts from Settings, and create a new account. You can see a Twitter icon at the bottom of the account list:


You can sign in with your Twitter credentials. If you want to fine tune some options, you can do it from advanced settings:




Most options are self-explained. Here I only want to emphasize two: "Retrieve Tweets History After Login" and "Add Url Link to Each Tweet". Unlike IM, Twitter is an asynchronized communication method. IM often means real-time synchronized communication, implying that both ends need to be online at the same time in order to start a conversation. By contrast, Twitter conversations happened asynchronously most of time. For instance, one person saw an interesting tweet from his home timeline, and replied it. Maybe one hour or one day later his friend saw this reply tweet and reply back. Eventually, their conversation is continued in such anasynchornized way. Twitter as asynchronized communication is even more evident in mobile devices. Simply due to battery limitation, mobile users can be hardly always online. Therefore, whenever a mobile user goes online, he may want to check all replies tweets that were sent to him while he was offline. "Retrieve Tweets History AfterLogin" is for this requirement. By enabling it, this plugin will save a user's state when he goes offline. It can restore the state when the user goes online next time, thus retrieving replies exactly since the last reply he received.

"Add Url Link to Each Tweet" is a workaround to the built-in Conversations app's limitation. Integration can mean more power and convenience. On the other hand, integration can also mean compromise, since the built-in Conversations app is never designed formicroblogging. For instance, you cannot favorite or RT a tweet from its UI . Adding a URL link to each tweet can give users an option to open the tweet via browser, where users can access to these extra functions.

After signed in, you can go online your Twitter accounts. The plugin will start syncing your Twitter following list to Contacts subsequently.


2. Contacts Integration

Your Twitter friends and saved search queries (with a # prefix) are imported to Contacts. The current implementation imports all your following list. This may mess up your phonebook, since a user may have thousands of Twitter contacts, but he may never call orSMS most of them in real life. In future, we will implement selective contacts importing. For now, you can just disable your Twitter accounts when not in use. All Twitter contacts will be automatically removed from Contacts, until you enable your accounts again.


You can also choose to see only contacts from a particular Twitter account from groups view (tap on the title bar of all contacts view, and choose Groups from the drop-down menu):


One of the greatest advantages of an integrated phonebook is that you can merge different identities (phone number, Gtalk, Skype or Twitter ID, etc) of the same person. Afterwards, you can concentrate on who to contact, rather than how to contact who. By contrast, in other mobile platforms, communication could mean opening which app to contact who in a what way.


Since this plugin integrates Twitter to Maemo platform as an IM protocol, you can IM a Twitter contact. This will open a conversation window, from which you can send a reply or mention tweet to the contact.

3. Twitter Conversation

A Twitter conversation window shows the history thread of reply/mention tweets from one of your Twitter contacts. Your Twitter ID is stripped from reply tweets. Likewise, you do not need to include your contact's Twitter ID when you reply him, the plugin will automatically add it for you. In addition, in your reply, the plugin will add the ID of your contact's last reply in the conversation to it. Therefore, others can track your conversation from Twitter website or other Twitter clients.


The above conversation looks like the following in the Twitter website:


4. Twitter Search


The greatest thing this plugin can offer is perhaps the search feature. As mentioned above, saved search queries are imported as Twitter contacts, with their names starting with #. However, unlike reply/mention tweets, search results are not automatically retrieved from Twitter. The plugin will only start periodically retrieving results for a search query after opening a chat with the corresponding search contact. If you close the search window, the plugin will also stop receiving search results.


You can also monitor results for multiple search queries. The plugin fully leverage the multitasking power and notification convenience of Maemo platform. Keeping up with topics you are interested couldn't be any easier in a mobile device.


If you want to search a keyword that is not in your saved queries, you can easily do it from Conversations app. Just tap on its title bar and choose "SendIM to". Type your search query after a # and continue.



5. Unified Messaging Inbox

All reply/mention tweets, as well as your search results, are saved in Conversations app's unified messaging inbox, together with SMS and IMs (Gtalk, Skype, MSN, etc). All types of messages are listed as history threads, grouped by contact. You simply do not need a standalone app for each type of messages.


6. Behind the Scene

This Twitter plugin is based on neaveru's libpurple-twitter-protocol, with enhancement of Twitter search and some other features. It is integrated to Maemo via telepathy-haze, a libpurple-to-telepathy bridge written by Will Thompson. The plugin is currently available in Maemo.org's Extras-devel repository. You can find instruction on how to add this repository to app manager from here.

The plugin is still under active development, so we are looking forward to any kind of feedbacks and suggestion. We will add support for DMs, home timeline, your own timeline, trends, etc in future. So stay tuned.

This blog is also posted to other places:
talk@maemo.org