I really think that the Semantic Web, and especially FOAF and SIOC can be an answer to the social graph and distributed social networks, as explained (and drawn) there: do not rely on proprietary APIs, but provide data in a way that can be universally linked and understood by software agents.
There are already RDF exporters for Twitter or Facebook, and here’s my contribution to the Giant Global Graph: a Flickr exporter, exporting accounts and groups – if you want some data about your pictures, check flickurl.
It uses the phpFlickr API and exports only publicly available data, to be compliant with Flickr privacy settings (i.e. if you setup your account so that not connected users cannot see it in any contact list, it won’t appear in those contact lists RDF exports).
Basically, it exports one RDF file per user, including one foaf:Person and a related sioc:User – with basic properties (sioc:name, sioc:avatar) as well as a link to his image gallery using the SIOC types ImageGalery class -, and exports the relationships (foaf:knows) with other users, and groups he’s member of (sioc:member_of). Groups are exported is another file, with related informations (dc:description, foaf:depiction …). Files are related with seeAlso links.
In order to be compliant with the Linked Data principles, the script also defines a URI for each foaf:Person, so that anyone can link to it from his FOAF profile, using this pattern within his own foaf:Person description:
It also defines an URI for each sioc:User and sioc:UserGroup. I could have used the Flickr account URL, but I think that’s better to make the difference between the account itself, and the homepage of this account, same for the groups.
URIs are defined as follows:
- People: http://apassant.net/home/2007/12/flickrdf/people/user_id
- User: http://apassant.net/home/2007/12/flickrdf/user/user_id
- Group: http://apassant.net/home/2007/12/flickrdf/groups/user_id
While data is available at:
- People / User: http://apassant.net/home/2007/12/flickrdf/data/people/user_id
- Group: http://apassant.net/home/2007/12/flickrdf/data/groups/user_id
Eg with my profile:
- foaf:Person URI: http://apassant.net/home/2007/12/flickrdf/people/33669349@N00
- siocUser: http://apassant.net/home/2007/12/flickrdf/user/33669349@N00
- Related RDF file: http://apassant.net/home/2007/12/flickrdf/data/people/33669349@N00
- sioc:UserGroup URI example: http://apassant.net/home/2007/12/flickrdf/groups/23989049@N00
- Related RDF file: http://apassant.net/home/2007/12/flickrdf/data/groups/23989049@N00
It uses content-negociation and 303 redirections to the RDF file or to Flickr.com, depending if you access the page with an RDF-compliant browser or not.
Finally, profiles are also linked to existing URIs thanks to:
- the dcterms:language property for any group, by using lingvoj URIs
- the geonames:locatedIn property for each user, reusing geonames.org RDF data. The script uses the first item returned by the geonames.org search web service for the location setup in the flickr profile, so I hope they’re won’t be too much mistakes (it should work fine if you mention “city, (state,) country”).
Please note that each created page is kept on the server. If you want to rebuild one, go to the service homepage and create a profile (you’ll see it also work with user names if you don’t know user id but be careful the user name is not the screen name). A dataset of created profiles should be available soon.
Edit 22/12/2006: Check this post for more details on issues with how to deal with user name / user ID.