SIOC reader (universal) widget

On yesterday's SIOC brainstorming, Knud Möller mentioned the use of widgets to browse SIOC data.

I take a look today at the Universal Widget API from Netvibes and wrote a simple widget, that will query any SPARQL endpoint of your choice (need to support JSON output for SELECT queries) for fresh SIOC data. There's certainly a lof of funniest things we can do with SIOC and widgets (eg: find similar posts in all the sioc-o-sphere when browsing a blog, related pictures, people ...), but that's a starting point. Here's what it looks like in iGoogle

siocwidget.png

You can setup the number of items you want to retrieve, as well as the type (default sioc:Post) and the property used to match the date (since I noticed that some SIOC data use dct:modified while others juste use dct:created - it's time for a SIOC-best practices guide !). Just go to the widget editing interface to change the values. By default, the widget uses one of the Talis platform endpoint URL, thanks a lot to Keith Alexander for quickly setting a JSON-enabled endpoint so that I debugged the widget !

The widget constructs the following query according your parameters:

SELECT ?post ?title
WHERE {
  ?post rdf:type $type ;
    ?post dc:title ?title ;
    ?post $date ?date .
}
ORDER BY DESC (?date) LIMIT $limit

This is the kind of widget that would be cool to plug to a SPARQLPress endpoint to get a quick overview of the activity of your social network, i.e. what are the last thing your friends twit, post, or listened to.

To use it, just go there and you'll be able to add it to iGoogle or netvibes. If you want to use a standalone version or put it on your blog, you may need additonal resources. I can't make it work on Dashboard yet, but I hope it will be ok soon.