photogeek

Bot Policy

http://www.livejournal.com/community/lj_dev/621620.html contains a new policy regarding bot usage, including how your bots should act. If you plan to write any tools that request data from LiveJournal, please make sure you read it.

Please keep in mind that this is still possibly subject to change, so keep your eyes open for more information from bradfitz regarding how to act with regard to taking information from LiveJournal.
catbert
  • alexp

(no subject)

It seems some sites, such as Plink, consolodate a feof:Person's appearances in several FEOF files by matching the mbox SHA1 value.

Would it be possible for LiveJournal to hash the mailbox values of a given user's friends (i.e. feof:Person under feof:knows)?

Forgive me if I am not making any sense, or if I am totally wrong. I have only spent about 15 minutes studying FEOF, and I was supposed to be in bed an hour ago.
photogeek

Privacy

I've seen a couple of weblog entries about how FOAF is a violation of the privacy of the users on the site, and so on and so forth.

The primary thing to remember about LiveJournal's FOAF information is that it's not presenting new or different information, only a new format. All the information available in my FOAF file is equally available in my User Information: compare http://crschmidt.livejournal.com/info to http://crschmidt.livejournal.com/data/foaf .

If you don't want your contact information shared, there's an easy solution - simply choose to not have your information shown to all users, which will block it from your FOAF file as well. If you would like to block your FOAF file from containing information like your friendships, you can do so by including a URL in the Edit Information page, at http://www.livejournal.com/editinfo.bml - simply fill in the "External FOAF URL" field.

LiveJournal allows options to block a certain subset of information, which FOAF respects. Any information that is displayed is not information that's difficult to find - simply parse the user information page.

That's why LiveJournal FOAF really isn't a big deal from a privacy standpoint: the information is already there.
photogeek

Orkut message - LJ FOAF

Since I've seen a lot of demand for FOAF from orkut, I thought I'd post a message to my friends on the site, a lot of whom are semantic webbers. This is the post I made to my Friends of Friends network on orkut - a message that got sent out to 750+ people.

If you are part of any large social site, you may want to do the same thing. Pass the message along - increasing the size of the semantic web is a goal not just for geeks, but for everyone.

----------- START -------------
to: friends of friends
subject: LiveJournal FOAF
message: I know this won't be applicable to all of you, but a fair number of people will probably be interested in this.

LiveJournal now exports FOAF data, including foaf:interests, foaf:knows, and contact information. It's exported for every user at http://www.livejournal.com/users/username/data/foaf . Discussion of the LiveJournal FOAF files can take place in a community I maintain - http://www.livejournal.com/community/ljfoaf . If you're interested in FOAF, that's the place to come to discuss it.

For those of you who don't know what FOAF is, it's the "Friend of a Friend" project - http://www.foaf-project.org . This project is geared towards making your relationships with other people machine readable.

FOAF is a way to describe yourself, and your relationships with other people. Orkut is a prime example of a site that could export FOAF data - your contact information, which you choose to display, could be displayed in an exportable format.

Some people might ask "What's the point?" The point of FOAF is to allow machines to look through people, find information that you might be interested in about that person, and deliver it to you.

Perhaps I'm interested in other people that are friends of my friends who live near O'Hare airport - I'm looking for a ride. So, I put in my FOAF file, which defines my friends, and tell it to search for "basedNear" codes of O'Hare airport. By using FOAF, it could expand out, find friends of friends, and give you back contact information for them.

The tools to do this thing need larger base data to advance. We need to be able to describe ourselves in a way that computers can understand in order to make better our interactions. This is the purpose of the semantic web - and LiveJournal is working to start it off.

Orkut can help too. Tell orkut today that you want FOAF data exported. Let them know you want to see machines talking to each other. In the end, you may be helping to start something big.

-Christopher Schmidt
lj:crschmidt
photogeek

Example FOAF file

The following is an example foaf file (for me). Each of the fields is rather self explanatory, but I thought I'd post this here, since most browser don't have an easily viewable way of showing application/rdf+xml data.

This file is trimmed of unimportant stuff - you don't need my entire interests lists, for example.

Collapse )

This example created to help those of you who want to write tools for this to do so.

Happy Parsing!
photogeek

External_foaf_url broken

Due to a lack of testing, most likely on my part, FOAF's external_foaf_url page returns a non-XML compliant page. I've opened a Zilla bug to deal with this, but you should keep in mind when possibly setting up your external FOAF URL that the page returned will not be XML compliant until this change goes in and live.

(Specifically, I forgot a / in a field, which causes the page not to parse. Damn semantics!)
photogeek

Expansion of FOAF support

What data would you like to see included in the FOAF spec next? What should or could LiveJournal support, what additions could be made, what else woudl fit into our data set?

This entry is for bringing up these suggestions. With the huge number of RDF resources on the web, there's a giant map of possibilities that could be searched for and used to describe LiveJournal users - the ones included are just a start.

Leave comments here for expansions you'd like to see for LiveJournal's FOAF support. Supporting your arguments with links so I can understand what you're going to use it for is good - as the original and main coder of LiveJournal FOAF, I'm going to be the one making the changes, most likely.

Convince me. What information do we need next?
photogeek

Linking your Journal to your FOAF file

Since FOAF is supposed to be integrating data, some of you might be asking where all this magical integration is coming from. Thus far, I've described a lot of LiveJournal specific ways of dealing with your FOAF file - now we get into the more interesting information.

Currently, if you have a properly coded journal style, utitlities have the ability to find an RSS feed of your journal simply by visiting your journal. In the source of the page is a tag:

<link title="RSS" href="http://www.livejournal.com/users/crschmidt/rss" rel="alternate" type="application/rss+xml" />

This tag tells any smart passers by that there is rss-xml information awaiting delivery at the URL mentioned. A tool could then go, gather the information for my entries, and have everything that it needs about the content stored by my journal. It would have a list of the most recent entries, who the author was, and more.

FOAF takes this concept a step further. Because it's possible to describe the person who owns the journal, you can find out a wide variety of information about the journal and author in question. In order to tell tools that integrate this type of data where your FOAF file is, LiveJournal will add this line to the <head> section of your journal:

<link title="FOAF" href="http://www.livejournal.com/users/crschmidt/data/foaf" rel="meta" type="application/rdf+xml" />

Because FOAF tools list a large number of people, it's best to identify who you are in the FOAF file. LiveJournal does this by adding the following line:

<meta name="foaf:maker" content="foaf:mbox_sha1sum '1ba3bffdd13a136d38b77542f2e26fd1dc0042f2' />

This string matches your FOAF file, where it will be generated based on your email address. This will tell FOAF tools which foaf:person is you specifically, rather than anyone else.

For more information on the foaf:maker tag, you can see http://usefulinc.com/foaf/iMadeThis . A good example of a tool which uses these links is Dashboard.

That's how LiveJournal tells web crawling type tools how to find your FOAF file, and to let them know that you were the one who made it.
photogeek

Only listing certain FOAF:knows

Since LiveJournal does not yet have true "trust" relationships, that indicate recprocity, the FOAF:knows relationship is not described exactly by the "friends" relationship. (For example, I friend brad, but he doesn't friend me back.) This would seem to be a problem, however, it is possible to override the users listed under FOAF:knows with a little bit of effort.

To accomodate for the fact that not everyone "knows" all the users on their friends lists, in order to modify who is displayed under your Foaf:knows categories, you simply need to create a specific friends group. You can create and modify your friends groups at http://www.livejournal.com/friends/editgroups.bml .

To use a FOAF friends group, create a new group labeled FOAF-knows. This group will act as a filter for users who are listed under your FOAF:knows listings. Simply add the journals you want listed there to the group, and they will be displayed under your FOAF:knows listings.

Keep in mind that LiveJournal will not display communities or syndicated feeds under the foaf:knows section. So, if you friend a community, even if it's in your FOAF-knows group, it won't be displayed in this section. This is both to conform to spec and to save in possible incorrect relations.

That sums up how to limit who shows up in your FOAF-knows filter, so that you only establish the relationships that you really think belong there.
photogeek

Searching for FOAF

In order to facilitate finding users more easily on LiveJournal, an option was added to redirect to the FOAF output of a user, so that you can search directly through FOAF files.

By sending a GET or POST request to http://www.livejournal.com/multisearch.bml, you can find a redirection to a FOAF file based on:
  1. Username
  2. Email
  3. AOL IM
  4. ICQ number
  5. Yahoo! ID
  6. MSN username
  7. Jabber ID


The format of a query should be:

q=search string
For example, q=crschmidt

type=search type
keys are, respective to order of list above:
  1. user
  2. email
  3. aolim
  4. icq
  5. yahoo
  6. msn
  7. jabber


output=foaf
This sets the output type to FOAF. This is an alternative to displaying the LiveJournal user information page, such as the one at http://www.livejournal.com/userinfo.bml?user=crschmidt . Keep in mind that all values must be escaped: for example, the @ sign would change to %40, and so on. If the search does not return any results, a return page will look something like http://www.livejournal.com/multisearch.bml?q=crschmidt%40livejournal.com&type=email . (The default scheme, xcolibur, will be used. If you are currently viewing the page in something other than xcolibur, you can see it to compare the source at http://goathack.livejournal.org:8023/multisearch.bml?q=crschmidt%40livejournal.com&type=email&usescheme=xcolibur .)

Keep in mind, not all users list the same contact user everywhere - although I'm crschmidt@livejournal.com in one place, I'm crschmid@uiuc.edu in another. So, you may want to compare on several of the contact information fields to ensure you're looking at the same person. Also, some users may choose to hide their contact information, so the fact that a search doesn't return anything isn't neccesarily an indicator that the user doesn't have a LiveJournal account.

This is the easiest way to find users FOAF files on LiveJournal - simply generate a query string with the contact information, send it to multisearch.bml with output=foaf, and you'll hopefully get a FOAF page back :)