I have been doing some digging into social networks that use XFN vice
Supposedly WordPress.com uses XFN but I have not been able to
demonstrate this (I have an account on WordPress and have tried
repeatedly to demonstrate the use of XFN but to no avail).
Conversely, I discovered that FOAF is used by many social networks.
Here is a list of 28 social networks that use FOAF:
Another thing that I have discovered is that the relationship
information provided by FOAF is just "knows", e.g. Alice knows Bob.
XFN, on the other hand, has a rich set of relationship information,
e.g. Alice is a friend, co-worker, neighbor, and kin of Bob.
Furthermore, XFN is a much lighter-weight approach (just add the
relationship onto a link) than FOAF (create a complex RDF document).
So it would seem that XFN provides a richer and lighter-weight set of
information and would be a better choice for social networks.
WHY IS THERE SUCH LITTLE USE OF XFN BY SOCIAL NETWORKS?
microformats-discuss mailing list
Digg Custom, hCard
Ma.gnol.ia XFN, hCard
MSN Spaces a mess
Tumblr No export
last.fm data is available as FOAF also thanks to a translator created
by Yves Raimond.
> LiveJournal None
LiveJournal supports FOAF.
> Pownce XFN
Pownce supports FOAF too.
> Twitter API
Twitter uses hCard/XFN and I provide a FOAF translator for data
available via their API.
Thanks. I don't see Twitter friend information being publicly
available though; you need to be logged in, do you not? I was
compiling this table for my own benefit; once you get to logging it
gets worth taking about the API rather than microformats because you
don't have to worry about paging through results, such as here 
> So it would seem that XFN provides a richer and lighter-weight set of
> information and would be a better choice for social networks.
XFN provides a richer set of *relationship* information, but FOAF provides
more than relationship information -- it also includes:
1. hCard-like contact information, but richer in in some ways,
having built-in support for a bunch of different instant
messaging types (as against hCard where these are hacked onto
the "URL" property), different types of URL, etc;
2. topics and interests;
3. group/club membership;
All of which are beyond the determined scope of XFN. Having that kind of
thing makes FOAF very useful for social-networking type sites.
In terms of relationships, FOAF *can* go beyond foaf:knows by taking
advantage of two things:
1. Implicit relationships. If two people have the same
foaf:workHomepage, then they are probably co-workers.
2. FOAF is RDF. You can mix and match RDF vocabularies.
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 188.8.131.52-mm-desktop-9mdvsmp, up 41 days, 21:39.]
The Semantic Web
It's not a choice - you can use both, and you can extend your FOAF
with other predicates - for example, the Relationships Ontology:
> It's not a choice - you can use both, and you can extend your FOAF
> with other predicate
Indeed. One could even use XFN with FOAF:
Going the other way around:
<p about="#alice">Alice <a rel="foaf:knows friend" href="#bob">Bob</
<p about="#bob">Bob <a rel="foaf:knows friend" href="#alice">Alice</
Now that's something I'd never thought of...
This is using the RDFa syntax. Some people like RDFa syntax, but I
think that it can often lead to repetition. In this scenario, you are
using XFN rel values to map to foaf:knows. It's probably a better idea
to simply use the XFN syntax, and then use a GRDDL profile to map that
to the underlying RDF semantics.
<p class="person" id="alice">Alice knows <a href="#bob" rel="friend">Bob</a></p>
<p class="person" id="bob">Bob knows <a href="#alice" rel="friend">Alice</a></p>
is a more natural HTML syntax* (you could go further and replace the
'person' class with an hCard (although you would then have to add
extra child elements to these elements to make them into valid
hCards). You then put together a GRDDL document which translates the
HTML above into the relevant RDF/XML syntax.
* It is also representable in HTML 4 and XHTML 1.0. Only a limited
subset of RDFa can be represented in HTML 4 or XHTML 1.0 - while the
more expressive parts require you use the W3C's RDFa+XHTML 1.1 DTD if
you want it to validate.
Anyway, that's just my opinion and not strictly on-topic for
microformats-discuss. Read the GRDDL Primer at:
Ask in #swig on irc.freenode.net or e-mail me off-list if you want to know more.
- Typepad uses FOAF, but I can't find a single example of non-trivial FOAF files
- When I'm searching for foaf & xfn stuff right now on Google, this
discussion is already first page...
Almost every profile page.
View source and search for rel="contact". It's there!
The individual user pages on Twitter contain XFN.
The only catch here is that the only relation represented is 'contact',
and the link is to the user's Twitter page rather than an external site.
However, you could do a two-stage parse: follow the link to the user's
Twitter page, and then look for a link with 'rel="me"' to discover their
website (because links to the user's website are also XFN-marked, using
the 'me' relation).
All the user pages on twitter have xfn attached to people who they are
following using rel="contact" in hcard
<a title="Jack Dorsey" rel="contact" class="url"
href="http://twitter.com/jack"><img width="24" height="24"
src="http://s3.amazonaws.com/twitter_production/profile_images/49893972/Photo_22_mini.jpg" id="profile-image" class="photo fn" alt="Jack Dorsey"/></a>
>From Tantek's page
I haven't seen much else though, hope this helps.
On Wed, 2008-03-12 at 09:47 -0400, Costello, Roger L. wrote:
> A few days ago I was browsing through Twitter and at somebody's web
> page I viewed the page source and found XFN being used.
> I didn't bookmark that page. Since then I have been unable to find
> pages on Twitter that contains XFN. Can someone point me to a web
> on Twitter which contains XFN?