About
SemanticTweet is a simple web service that generates a FOAF RDF document for you from your list of Twitter friends and followers (or more specifically, from the 100 most recent of each of your friends and followers). It does this using the Twitter REST API. This service uses public Twitter data only, and so doesn’t need your Twitter username or password.
FOAF, which stands for friend-of-a-friend, if you’re unfamiliar with it, is a semantic web representation of your list of friends. It’s typically represented in a semantic web format known as RDF: resource description framework. To give you an idea of what a FOAF document looks like, here’s the @semantictweet one, as generated by SemanticTweet (how meta).
One of the benefits of this approach is that it ensures that you don’t have to build and maintain your FOAF file by hand (or using a service like FOAF-a-matic), which is a real pain. This service will dynamically generate the FOAF file each time its queried. The second big benefit is that it turns your friends’ Twitter pages into dereferenceable URIs, which means that a semantic web browser or search engine can traverse from link-to-link, just like a standard web page, and all without having to explicitly call the Twitter API.
One way you can use this service/document is by embedding it in your blog/website. Just add a line to the <head> section of your template which reads:
<link rel="meta" type="application/rdf+xml" title="FOAF"
href="http://semantictweet.com/your-twitter-screen-name" />
Of course, remember to change the your-twitter-screen-name to your actual Twitter screen name.
This approach is what Tim Berners-Lee refers to as Linked Data. Check out his excellent talk at TED to get a better idea of this movement.
There’s plenty more to do, and plenty of ways in which Twitter data can be presented in a semantic webby way, to allow more interesting documents to be produced, so watch this space. So check it out and play around with the service. You too can have that FOAF document you’ve always wanted but were afraid to ask for. Let me know if you have any comments or observations.
Who
SemanticTweet is in active development by Steve Flinter, aka @sflinter. You can follow developments on my own blog, or the SemanticTweet blog and @semantictweet.
Acknowledgements
SemanticTweet is built on a ton of outstanding open source software, without which I probably wouldn’t have bothered to start this project. In no particular order:
- Sinatra web framework
- HTTParty
- Builder
- Ruby, the language of the gods
- And, of course, the Twitter API itself
Kudos and thanks to all those involved in those amazing projects.