If you already know what the Social Graph API and XFN are, you can skip the background information and go directly to the Blogroll Links plugin for WordPress that is designed to work with these.
Update: 2010-Feb-20: Version 2 of the Blogroll Links plugin for WordPress uses the Shortcode API and so introduces a new code-tag format. The new plugin still supports the old (now deprecated) code-tag format for backwards compatibility. See below for examples.
Social Graph API
With so many websites to join, users must decide where to invest significant time in adding their same connections over and over. For developers, this means it is difficult to build successful web applications that hinge upon a critical mass of users for content and interaction. With the Social Graph API, developers can now utilize public connections their users have already created in other web services. It makes information about public connections between people easily available and useful.
We (Google) currently index the public Web for XHTML Friends Network (XFN), Friend of a Friend (FOAF) markup and other publicly declared connections. By supporting open Web standards for describing connections between people, web sites can add to the social infrastructure of the web.
The Google Code site also has a video introduction to the open social graph:
The Google Code site has some interesting example applications. To see the power of the open social graph, follow these links:
- Connections between my URLs on my sites and my pages on social networking sites.
- Connections with some of my contacts found via social networks and sites that are friendly to the open social graph.
All I did was enter my home page http://www.rajiv.com/ into these applications and got the results linked to above.
XHTML Friends Network, a component of open social networks
XFN (XHTML Friends Network) is a simple way to represent human relationships using hyperlinks. In recent years, blogs and blogrolls have become the fastest growing area of the Web. XFN enables web authors to indicate their relationship(s) to the people in their blogrolls simply by adding a ‘
rel‘ attribute to their
<a href> tags, e.g.:
<a href="http://www.rajiv.com/" rel="friend met">Home Page: Rajiv Pant</a>
The above link means that the page at http://www.rajiv.com/ belongs to a friend of the person who who owns the page this link is placed on. The met tag specifies that the two friends have met in real life. The link above would not be placed on a page owned by Rajiv Pant. It would be placed by a friend on their page, for example, on http://www.paradox1x.org/
Here is another example:
<a href="http://photos.rajiv.com/" rel="me">Photo Albums: Rajiv Pant</a>
This link states that the page at the URL http://photos.rajiv.com/ belongs to the same person who owns the page this link is placed on. For example, the above link would be placed on http://www.rajiv.com/ telling the Web that the URLs http://photos.rajiv.com/ and http://www.rajiv.com/belong to the same person.
To find out how to write and use XFN, or to write a program to generate or spider it, visit the XFN Web site.
For people who maintain their Web site or blog using the WordPress blog content management system, I created an open source plugin called blogroll-links that uses WordPress’ built-in Blogroll feature2 and presents links to friends’ home pages and own pages on social networking sites using XFN in the links.
Features of this plugin
- It can show the links by category in blog posts and WordPress Pages.
- It uses WordPress’ standard built-in Blogroll links database. There is no hassle of another list of links to maintain.
- It can be used to show only the links assigned to a particular category, by stating the category slug as defined in that category’s setting in WordPress.
- It honors the Show/Hidden setting as defined for each link in WordPress.
- It displays the link in the same window or new window, as specified for each link in WordPress.
- The two lists, first one of links to my own pages on various social networking sites and the second one of links to some of my friends’ pages are generated by this plugin. Yes, those social networks’ logo pictures are also taken by the plugin from the WordPress standard Blogroll links. Code:
<h3>My Pages on Social Networking Sites</h3>
[[blogroll-links categoryslug="rajiv-web" sortby="link_name" sortorder="desc"]]
<h3>Web Sites of Some People I Know</h3>
[[blogroll-links categoryslug="people" sortby="link_name" sortorder="desc"]]
- This list of charitable organizations with brief descriptions is generated by the plugin. Code:
- This list of search engines is maintained as Blogroll links in WordPress. Code:
- The featured links shown under the “What’s featured here?” section shows the links I’ve categorized as featured in WordPress’ Blogroll links. Code:
<a title="featured" name="featured"></a>
<h2>What's featured here?</h2>
[[blogroll-links categoryslug="featured" sortby="link_name" sortorder="desc"]]
Download & install plugin
- WikiPedia article explaining what an API, or application programming interface is.
- It does not make you maintain yet another list of links