Our Blog

Twitter Annotations: The art of driving fast without lights


Posted by
14 October 2010
15:28
1 comment

In April, at Chirp, a Twitter Developer’s Conference, Twitter announced amongst other things a feature called Annotations. This was presented alongside very exciting developments like User Streams and Site Streams, which caused Annotations to not quite get the press it deserves. I, for one, only realized its existence (and immense potential) after a talk by Aral Balkan at Devnest.

So, first things first – what are Twitter Annotations?


Twitter Annotations

Twitter Annotations allow API consumers (ie Twitter applications) to add custom metadata to a Tweet when posting it to Twitter. The metadata is organized in sets of attribute-value pairs. Each such a set is called a type.

The simplest application of Annotations is to enrich Tweets, and make them behave more like Facebook Feed Posts. A prime example is the webpage annotation type, with attributes title, url and image. The JSON representation of an example of such an annotation would be:

"annotations":[{"webpage":{"title":"NuL", "url":"http://nul.co.za", "image": "http://nul.co.za/header.jpg"}}]

A client equipped to display such a tweet to its full capacity, could use this annotation data to display the shared website below the tweet as a linked title, decorated with an icon (the picture).

Tweet enrichment is only the beginning though.

Consider for example a set of data called chess_move, which might include the attribute move with value Nf3 Nc6, attribute evaluation with value !?, and attribute comment with value interesting move! (read here for an interesting post about formalized chess move punctuation). This annotation would be represented by the JSON string:

"annotations":[{"chess_move":{"move":"Nf3 Nc6", "evaluation":"!?", "comment": "interesting move!"}}]

So, what happens to this annotation when it’s added to my Tweet? I mean, what will this chess move display like on Twitter.com? The answer, which might surprise you at this point, is, it won’t display at all. So, what’s the use then?

This is where, in my opinion, Twitter is revealing its amazingly progressive attitude towards business development.

Twitter is, through Annotations, going to allow developers to build custom applications which use Twitter as a communications back end. The chess_move data type will thus be usable in a chess client which allows players to play against each other (or against robots) online. The tweets themselves can be headless, meaning they don’t contain anything in the 140 character message space, and thus only have meaning when using the chess client (or subsequently built chess clients built on the chess_move annotation type).

In the announcement made on the twitter-api-announce group, Marcel Molina from Twitter effectively explained how they’re not going to try and police this space at all, and let it grow completely organically, ending with the inspiring words: Think big. Blow our minds.

Let’s consider, for the sake of argument, recreating Facebook, using Twitter Annotations.

Each element type on Facebook, like pages, profiles, groups, albums, etc would still have to be created by the developer and stored in a database, since Twitter does not store any data for very long. The interaction between users and these elements, however, can be built on Twitter Annotations entirely. Imagine creating a Facebook page by defining sending the following annotation:

"annotations":[{"fb_page":{"name":"page name", "picture":"page profile picture", "category": "page category"}}]

Or the user, after sending a special get_page annotation, receives a tweet with the following annotation:

"annotations":[{"fb_page":{"id":"page ID", "name":"page name", "picture":"page profile picture", "category": "page category", "fan_count", "page fan count"}}]

I’m sure you get the picture – there are literally no limits.

The real beauty behind Twitter Annotations is that Twitter is effectively Crowdsourcing their business development, placing themselves in charge of providing the communications backbone to whatever wonderful applications their API consumers can come up with. They are driving fast without lights – not knowing where their user base might lead them, but boldly going there, wherever that might be.

Posted by

1 Trackback

  • [...] In April, at Chirp, a Twitter Developer’s Conference, Twitter announced a feature called Annotations. This was announced alongside very exciting developments like User Streams and Site Streams, which caused it to not quite get the press it deserves. In this week’s tech insight we explore the potential disruptive power of Twitter Annotations. Read More » [...]

Leave a Comment

Your email is never shared. Required fields are marked *