views:

157

answers:

1

I'd like to get the Facebook profile ID of a Facebook user's father.

Basically I want to display a picture of the user's father and say 'how about buying an X for Dad'.

Is this possible with the graph (or REST) API ?

Edit: It looks like this needs to be an FQL query and can't be done directly with the other APIs. I'm still trying to figure out how to do this, and looking for the correct JOIN format to get the information. I'll post it if I figure it out. Thanks for the interest in the question everyone. Been fun reading everyones comments coming in. Would appreciate a little more constructive criticism though - as opposed to rampant downvoting. If you think people will be disenfranchised by this I'd be interested to hear reasons why. As a friendly reminder of an upcoming event I see nothin wrong with this approach. I'm respectfully considering different wording if a father cannot be found - in case they are deceased. If i was asking 'how do i write to someones stream that that X is buying Y a Z for father's day' it would be one thing - but I thought this was a pretty trivial 'privacy' issue. But then again maybe some of you disagree... Thanks for reading...

+10  A: 

Clearly this is a very touchy subject for developers considering all the downvotes. I personally hate Facebook, but this is a completely valid question. It's definitely possible with standard FQL queries. Just write queries for the "family" table:

http://developers.facebook.com/docs/reference/fql/family

This table should have a field called "relationship" which defines what the user's relationship is to that person (parent, mother, father, sibling, sister, brother, child, son, daughter). Graph API is still quite new and doesn't seem to have anything specifically for that yet.

Edit

Meet my family:

SELECT uid, relationship from family where profile_id=xxxxxx

[
  {
    "relationship": "brother",
    "uid": "xxxxxx"
  },
  {
    "relationship": "father",
    "uid": "xxxxxx"
  },
  {
    "relationship": "mother",
    "uid": "xxxxxx"
  }
]

You can test it on the new API docs here.

Typeoneerror
the family table doesn't show a relationship in the new documentation http://developers.facebook.com/docs/reference/fql/family.
Simon_Weaver
you can still use the previous SDK. it's deprecated, not removed. give it a try before you vote down, please. Facebook's documentation is terrible; wouldn't take their word for it.
Typeoneerror
K, you can vote it back up now. proved it's completely possible. :)
Typeoneerror
@typeonerror thanks a lot for your help! that was a fun ride. what is the world coming to when a computer shows you your own father without your consent... :-)
Simon_Weaver

related questions