(Difference between revisions)


(Undo revision 860 by (Talk) Spam)
(What is FOAF?)
Line 15: Line 15:
* "I write in this weblog..."
* "I write in this weblog..."
* "You can see me in this picture..."
* "You can see me in this picture..."
* "My Public Key is ..."
FOAF is a way to say all those things, but so that ''computers'' can interpret it. Computers can't understand English yet, so we have to be a little more precise in how we say these things. FOAF is a way of saying these things for computers.
FOAF is a way to say all those things, but so that ''computers'' can interpret it. Computers can't understand English yet, so we have to be a little more precise in how we say these things. FOAF is a way of saying these things for computers.

Latest revision as of 14:28, 17 October 2010




What is FOAF?

FOAF is a way to describe people and relationships to computers. FOAF stands for Friend Of A Friend. Technically, it is an RDF/XML Semantic Web vocabulary. Because of this, FOAF data is easy to process and merge.

Home pages typically say things such as:

  • "My name is..."
  • "I work for..."
  • "I'm interested in..."
  • "I live near..."
  • "My blog is..."
  • "I write in this weblog..."
  • "You can see me in this picture..."
  • "My Public Key is ..."

FOAF is a way to say all those things, but so that computers can interpret it. Computers can't understand English yet, so we have to be a little more precise in how we say these things. FOAF is a way of saying these things for computers.

What would computers do with this information? We experiment all the time, but here are some questions that computers can answer using FOAF data:

  • "Show me pictures of bloggers interested in (foo) who live near me."
  • "Show me recent articles written by people at this meeting."
  • "Is this person vegetarian?"

FOAF is a ESW:SemanticWeb project. The Semantic Web is an effort to make it easier for computers to get useful information from the Internet.

Where can I learn more?

Can I use FOAF to get my data back from social networking sites?

FOAF has long been available from some social networking sites as an output format: originally LiveJournal (example) and Ecademy deployed exporters thanks to work by Chris Schmidt and Julian Bond respectively; later Tribe.net (example) and recently facebook by Matthew Rowe and Flickr by Alexandre Passant. See DataSources for more details.

Work has recently been going on by Benjamin Nowack, Morten Fredriksen and others on ARC for personalised aggregation of profiles from different sites.

How about using FOAF for dating, matchmaking etc? Has that been suggested?

Many times! This is not something to do lightly, or carelessly. The potential for making a mess is huge. The page to discuss this is TowardFOAFster. See also A Purpose of FOAF for related goals, and Damian Steer's foaffinger implementation for presence-based FOAF tools.

Previous writings on this and related topic include:

  • John Beatty on Friend-of-a-Friend, 802.11, zeroconf
  • Bluetooth turns airwaves blue, "Swingers exchange business cards wirelessly" (Tony Dennis, the enquirer 30 Aug 2003)
  • FoafMobile is also somewhat relevant, esp. re the Bluetooth examples
  • see DataSources for info on sites currently exporting FOAF data eg Zopto, PeopleAggregator.
  • see the Relationship vocabulary which can be used to describe specific types of relationships in a FOAF file.

What about FOAF and email, spam etc?

We provide a way to represent a 'hashed' email address in FOAF, 'foaf:mbox_sha1sum'. If you know the original, you can figure out the sha1sum but not vice versa. This means people can be identified without obviously revealing their email address, making it harder for spammers to harvest addresses from FOAF data.

The FOAF whitelists experiment takes this a step further, exploring the use of FOAF for sharing lists of non-spammer mailboxes, to aid in collaborative mail filtering tools.

Creating FOAF

Why should I create a FOAF document?

By describing yourself using FOAF you're providing information, in a machine-processable format, about yourself, your interests, your location, and your friends. And this isn't a comprehensive list!.

There are many existing and developing applications that can take this information and use it in many interesting ways. This could include email "whitelists" that will allow you to prune out SPAM messages from people you don't know; business oriented applications that can leverage a network of business contacts; social network tools (e.g. find people interested in the same things as you, maybe even a date :) ); and a whole host of others.

If you're familiar with 'blogging and providing RSS syndication of the content of your 'blog, then one way to view FOAF is as syndicating yourself. FOAF has the potential to drive innovation for all kinds of applications just as RSS has done so for publishing.

How do I create my first FOAF document?

At present the simplest way to create your first FOAF file is to visit either the FOAF-a-Matic or FoaF Creator and fill out the forms provided. Both tools will generate a basic description for you that covers the most commonly used FOAF data items, i.e. who you are and who your friends are. (FOAF-a-Matic uses JavaScript and HTML, whilst FoaF Creator uses XForms - the formsplayer application which supports FoaF Creator involves registration for a free download --- and is specific to Microsoft Internet Explorer.)

Both tools will generate a FOAF document for you, although there are slight differences in how you obtain that document -- with FOAF-a-Matic you should cut-and-paste the RDF from the online form into a file, whilst with FoaF Creator a file is created for you on your desktop. Whichever way your file is created it should then be saved/uploaded to your website. This FAQ can't possibly cover all the many different ways to do this, but it's worth mentioning that many 'blogging tools have a way to upload additional files directly to your website.

However if you're a happy RDF or XML hacker then you may want to pitch right in and craft your FOAF document yourself. If so then you may want to work through the sections listed in FoafExamples

If you're already a member of a social networking site like LiveJournal or Facebook, you could try one the exporters - see DataSources.

It should be noted that there is another method of creating a FOAF document, namely foafgen, source-code available for download. Foafgen also has vCard support, and grabs delicious tags and converts them in foaf:interests.

What URL should I use for my FOAF document? Where should it live on my web site?

You can place the file anywhere. The only requirement being that it be on the public internet. If you can download the file through your browser then you're all set. People often use the filename 'foaf.rdf' but it really is up to you. The official mimetype for RDF is application/rdf+xml but people often serve it as text/html.

How can I tell my FOAF file is correct?

Foaf-a-matic will generate a valid foaf file for you, but if you write it yourself you may want to validate it.

The first thing to do is use the W3C RDF Validator service to check your FOAF file.

You can then use Rosco to get some feedback on what you've written.

FOAF browsers like FoaF Explorer, foaf.qdos.com and FOAF visualizer provide some visual feedback for a subset of valid files, but should not be expected to handle all cases - if it barfs, your file may still be fine.

If you want to use the W3C RDF Validator, then here's how you do it:

If you haven't yet uploaded your FOAF document to the web, then simple paste in the RDF into the form provided and click "Parse RDF".

If your FOAF file is on the web then you can enter the URL in the text box below the form, and then click "Parse URI".

(You can ignore the other options for now, unless you're interested in exploring the RDF data further.)

The validator will then validate the RDF (however it was provided) and provide you with a summary page that has a great deal of information on it, including the original source document, details about what RDF statements it's extracted, and a pretty graph of the results. Most importantly though it includes the validation feedback, you can jump to this directly using the "Feedback" link at the top of the page.

If your FOAF file is valid then you should see this message: Your RDF document validated successfully.

If your FOAF file is invalid then you will see some error messages describing the problems. If you have trouble interpreting these then feel free to post to the rdfweb-dev mailing list, or drop into the #foaf IRC channel for help.

For a more technical discussion on the detection of certain kinds of mistake in FOAF files, see FoafContradictions.

How should I link to my FOAF file?

Similarly to RSS, FOAF applications use Autodiscovery, embedding links to your FOAF document inside your web page, like this:

<link rel="meta" type="application/rdf+xml" title="FOAF" href="foaf.rdf" />

There are also several Icons you can use to your FOAF file directly (or otherwise indicate that the page has an embedded FOAF link).

I've updated my FOAF file is there anything I should do?

Generally speaking no, the next time your FOAF document is picked up by a FOAF harvester the new data will be processed. And anyone using tools like FoaF Explorer will see the results immediately.

If you're using FOAFnaut then you can trigger an update straight-away by using the FOAFnaut database update form. Alternatively you can simply use the Ping FOAFnaut bookmarklet.

I moved my FOAF file

How do I tell aggregators etc. that it has moved?

If your FOAF file is served from an Apache Web server, here is one technique (cf. Apache documentation):

#The next line is to be placed at the root of your (former) Web site in a file /.htaccess
Redirect permanent /old-folder/foaf.rdf http://example.net/foaf.rdf

As per HTTP/1.1 specification (RFC2616), FOAF aggregators - as any other HTTP client - MUST understand this redirection and SHOULD use the new address for future references. See ScutterSpec for links to various RDF aggregators.

Application Specific Questions

FOAFnaut is displaying an old version of my FOAF document!

FOAFnaut only periodically refreshes its database. If you want to trigger an update straight-away then you can do so by using the FOAFnaut database update form.

Alternatively you can simply use the Ping FOAFnaut bookmarklet.


You need a glossary! Smushing? Scutter?

See Smushing and Scutter

How is "FOAF" pronounced?

FOAF is usually pronounced as a word rhyming with oaf, loaf etc., rather than spelling out the acronym.

How does FOAF relate to vCard? are there any convertors?

See FoafAndVcard

What about FOAF and XFN and other microformats?

In general XFN has more specific properties available. There are a couple of converters at least: ARC has some microformats extractors, and Masahide Kanzaki has some XSLT.

What other discussion documents are out there on the use of FOAF in various contexts?


How do I show that this is *my* FOAF file

Use foaf:PersonalProfileDocument. There's an example on that page.

How do I write FOAF information about a person who is dead or a person who doesn't an email address, homepage, weblog or nick?

a suggestion

How do I talk about groups in FOAF?

example from the spec

Any press articles mentioning FOAF?

The Wired article mentioned FOAF both briefly and inaccurately!

FOAF, is an attempt to build an open-source alternative to Friendster. The problem is, users have to be technically minded enough to build their own profiles.

Unfortunately, both these sentences are incorrect! FOAF makes it a lot easier for open-source (and open-content) alternatives to Friendster to be built. But it also makes it easier for commercial alternatives too, and provides a means for interoperability between such services. The notion of open-source applies to software licensing; FOAF isn't a software package. FOAF isn't a user database or Web site either. You own your own content; FOAF just gives you some terminology and structure to make it easy to share that content however you see fit. Forward-thinking service provides (such as the excellent TypePad service) are making it increasingly easy to share a FOAF profile online without being very technically minded at all.

So skip the Wired article and read Jason Cook's Web Monkey article on metadata instead.

Note: if you are a journalist considering writing a piece on FOAF, get in touch sooner rather than later so little inaccuracies can be fixed early on (mailto:foaf-contact@rdfweb.org).

Has anybody looked at adding FOAF to...

See Also