FOAF profile page parsing

15 views
Skip to first unread message

J. McConnell

unread,
Mar 5, 2010, 11:26:41 AM3/5/10
to social-g...@googlegroups.com
I have a FOAF file [1] which declares a number of accounts I hold and I'm wondering how SGAPI determines which should be "me" edges. The documentation claims that SGAPI looks for foaf:homepage elements to make this determination, which is, in fact what I am seeing. However, my reading of the FOAF documentation had me thinking something like this might be better (the xmlns of the document is foaf, hence no prefixes):

<holdsAccount>
  <OnlineAccount rdf:about="http://friendfeed.com/jdot">
    <accountServiceHomepage rdf:resource="http://friendfeed.com/"/>
    <accountProfilePage rdf:resource="http://friendfeed.com/jdot"/> 
    <accountName>jdot</accountName>
  </OnlineAccount>
</holdsAccount>

Currently, SGAPI did not create a me edge for that, but it did when I added:

<homepage rdf:resource="http://friendfeed.com/jdot"/>

Am I misunderstanding FOAF (which is quite possible) or would it be nice for SGAPI not to require the additional foaf:homepage element? Thanks for your thoughts and for all the hard work getting this going. I'm excited by the possibilities.

Regards,

- J.

Melvin Carvalho

unread,
Mar 5, 2010, 3:59:38 PM3/5/10
to social-g...@googlegroups.com


2010/3/5 J. McConnell <jdo...@gmail.com>

Your FOAF is correct.  If you click through the tabs here (account and activity) you'll see your account details are correclty parsed

http://foaf.me/?webid=http://ubermenschconsulting.com/j/foaf.rdf

An alternate way to represent an account is:

<foaf:holdsAccount rdf:resource="http://identi.ca/melvincarvalho"/>

or more recently

<foaf:account rdf:resource="http://identi.ca/melvincarvalho"/>

This resulted in a syntax optimization between Dan Brickley and Brad.

I'm not sure how easy it is for SGAPI to parse out this form is at the moment, it would require some SPARQL filtering.  If you're interested I can pass on the queries required.
 
--
You received this message because you are subscribed to the Google Groups "Social Graph API" group.
To post to this group, send email to social-g...@googlegroups.com.
To unsubscribe from this group, send email to social-graph-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/social-graph-api?hl=en.

J. McConnell

unread,
Mar 6, 2010, 6:07:11 PM3/6/10
to social-g...@googlegroups.com
On Fri, Mar 5, 2010 at 3:59 PM, Melvin Carvalho <melvinc...@gmail.com> wrote:

2010/3/5 J. McConnell <jdo...@gmail.com>
 
An alternate way to represent an account is:

<foaf:holdsAccount rdf:resource="http://identi.ca/melvincarvalho"/>

or more recently

<foaf:account rdf:resource="http://identi.ca/melvincarvalho"/>

This resulted in a syntax optimization between Dan Brickley and Brad.

I'm not sure how easy it is for SGAPI to parse out this form is at the moment, it would require some SPARQL filtering.  If you're interested I can pass on the queries required.

Thank you for your help, Melvin. FWIW, in case anyone's interested, I tried both syntaxes and neither seemed to be recognized by SGAPI, only a foaf:homepage element is.

Before I go and change all of my foaf:holdsAccount/foaf:account elements to foaf:homepage elements, are there any plans for recognizing these elements? They both seem more appropriate for a Facebook profile URI than a homepage element, but I'm willing to be pragmatic if there are no plans to support them in SGAPI. Since it is the only FOAF consumer I am concerned with at the moment, I may as well conform to it's behavior, unless there are plans to modify that behavior.

Thanks again for the help and suggestions,

- J.

Brad Fitzpatrick

unread,
Mar 6, 2010, 6:22:19 PM3/6/10
to social-g...@googlegroups.com
I send FOAF files through libraptor and get the triples out.  Which extra triple predicate(s) should I be looking for as 'me' links?  I always forget how to read the XML RDF encoding as triples.

--

J. McConnell

unread,
Mar 6, 2010, 7:12:13 PM3/6/10
to social-g...@googlegroups.com
On Sat, Mar 6, 2010 at 6:22 PM, Brad Fitzpatrick <brad...@google.com> wrote:
I send FOAF files through libraptor and get the triples out.  Which extra triple predicate(s) should I be looking for as 'me' links?  I always forget how to read the XML RDF encoding as triples.

Hi Brad,

I could be mistaken about this, but from my reading it would be correct to view the following triples as "me" links:

<http://ubermenschconsulting.com/j/foaf.rdf#me>
<http://xmlns.com/foaf/0.1/holdsAccount>
<http://linkedin.com/in/jmcconnell>

<http://ubermenschconsulting.com/j/foaf.rdf#me>
<http://xmlns.com/foaf/0.1/account>
<http://del.icio.us/jdot/>

I'm sure that's not the proper syntax for expressing triples, but does that make sense? I did not know about the foaf:account predicate until Melvin mentioned it, but I gather it is equivalent to the foaf:holdsAccount predicate and is thanks to your and Dan's work.

Thanks again,

- J.

Brad Fitzpatrick

unread,
Apr 9, 2010, 1:20:04 PM4/9/10
to social-g...@googlegroups.com
Sorry for the delay.

I filed this here, so I don't lose it in the chaos that is my inbox....

http://code.google.com/p/socialgraph-resources/issues/detail?id=5

If you have other examples of things that don't parse, but should, I think I'll be using that project's bug tracker for all socialgraph-api related issues.

- Brad


- J.

--

J. McConnell

unread,
Apr 9, 2010, 1:36:50 PM4/9/10
to social-g...@googlegroups.com
Thanks for following up, much appreciated :)

I don't have any other examples at the moment, but if I come across any I'll either comment on that ticket or open a new one, whichever seems more appropriate.

Regards,

- J.
Reply all
Reply to author
Forward
0 new messages