XFN Anyone?


Social networking has been around for awhile. Now Firefox is getting onboard with Coop (TechCrunch article), which gives the browser similar functions as Flock. Essentially these tools integrate social networking such as MySpace, del.icio.us, Flickr, and YouTube directly into the browser, making it easier, in theory, to communicate with friends online. A form of social networking is also inherently available in XHTML, as XFN (Wikipedia).

XFN, the XHTML Friends Network is often used in the markup of blogs, especially by those that support it directly, i.e., Wordpress. The way it works, essentially, is that in the “Links” section of your site/page, you can insert a little bit of code to represent your relationship to the owner of the linked page. If you view the source of the main page of this site and find the “My Network” section, you’ll see that each link, instead of looking like, i.e.:

<a href="http://thelittleninjagirl.blogspot.com/">Mary</a>

it looks like:

<a href="http://thelittleninjagirl.blogspot.com/" rel=”friend met”</a>

The use of the rel element in XHTML links is used in many blogs, but there are not many tools that take advantage of it. The ones that do are often site-crawlers such as rubhub and XHTML Friends. The disadvantage to using these is that the owner of the site must submit his site and wait for the site to crawl his page (XHTML Friends is pretty fast, though). Why is this a problem? XFN is an open standard and the rel attribute has existed as part of the HTML standard since HTML4!

If you search the extensions for Firefox, you will find that there is no XFN extension, nor anything related to XFN. Again, my question is why? The specs are easily available. The main reason I’m not jumping on it myself is that I don’t know XUL, but I can offer some ideas.

First of all, such an extension should be able to parse the XHTML for the rel element within a link. It should parse that according to the XFN specs. Of course that’s all a given. It would increase usability if it could go on to parse every page linked to by the page that’s being viewed and capture, i.e., recipricol links. The data can be cached, but the plugin should not need to rely on a remote server.

The display of this information could exist as a user-modifiable sidebar, where a user might be able to view the XFN relationship, whether that relationship is only one-directional or reciprocol, and offer a link. This link could link directly to the page (though, that would be redundant) or it could trigger a function in the extension that would parse that pages XFN and update the sidbar.

This would allow a fast and easy method of social networking over the web through open standards. If anyone knows of an extension that does something similar, or if anyone wants to start working on one, please inform me, as I’d be very interested.

Web 2.0 Bookmarks:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Reddit
  • Slashdot
  • Technorati
  • YahooMyWeb

4 Responses to “XFN Anyone?”

  1. Possum Says:

    I’ve hacked up a poorly written proof of concept in CGI/Perl (source). Now someone implement it in XUL :)

    Using Mozilla Firefox Mozilla Firefox on Windows Windows XP
  2. possum.kicks-ass.org » Blog Archive » Hoppy Easter Says:

    […] possum.kicks-ass.org Why? Because possum.kicks-ass « XFN Anyone? […]

    Using WordPress WordPress 2.1.2
  3. Possum Says:

    Looks like the Tails extension does something similar, with microformats, and perhaps a “Tails script” can handle XFN.

    Not exactly what I had in mind, but it’s on the right path :)

    Using Mozilla Firefox Mozilla Firefox on Windows Windows XP
  4. Possum Says:

    Hmm… I found something really close to what I was looking for. It’s a Greasemonkey script called XFN Viewer. This implementation causes a CSS-styled <div> to appear at the bottom of the screen (without modification). Some caveats are that it doesn’t detect ‘rel=”me”‘ (the XFN identity idea) and it doesn’t detect reciprocal links. Also, it kinda breaks unless you edit the scripts. Here are some screenshots:

    possum.kicks-ass.org + XFN Viewer photojunkie.ca + XFN Viewer

    Since the javascript in the script simply writes an extra <div> into the page, complete with CSS styling, it’s easy to add two lines to the script to prevent an issue like you see on photojunkie . The two lines you should add are:

    ‘ height: 15%;’ +

    ‘ overflow: auto;’ +

    Change the “15%” to whatever you think is reasonable. These lines should be added to the section “‘#xfnviewer-div-0 {’+”. With this fix, the result comes to something like this (notice the XFN div is now small, and scrollable):

    Photojunkie with fixes

    Anyway, it’s a nice script, and on the right track. But IMO, it would be nice to see something that uses XUL (to display in, i.e., a sidebar) and one that detects reciprocal links.

    By the way, if you use this script, and you want it to detect ‘rel=”me”‘ simply add “me” to the pipe-separated list named XFNRegex.

    Using Mozilla Firefox Mozilla Firefox on Windows Windows XP