James Williams
LinkedInMastodonGithub

Google Social Graph API and Microformats

Tags: General

Google recently released the Social Graph API which allows a user to see what sites are connected and the significance of those connections. Before you say this is a ploy by Google to own all your information, it isn't...well not totally. At the core of the Social Graph API is XFN (XHTML Friends Network) and FOAF (Friend of a Friend). For XFN, on outgoing links, you use the rel attribute to indicate your relationship to the person (from acquiantance to colleague to crush/muse). FOAF uses a XML file to describe both yourself and your relationships to others. Once more folks have their pages tagged, you could use the API to construct connection lists like LinkedIn does.

To each link of an acquaintance, all you need to do is add a rel attribute. For example, to mark up a link for my friend RJ, I would change it to the following:

<a href="http://cplusstudent.com" rel="friend met colleague">RJ Salicco</a>

The full list of acceptable values are here.

Microformats(like XFN and FOAF) make it easier for humans and machines to parse information. So in that end, it does fit into Google's mission statement.