Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Father's day coming up! - Can I get the profile of a Facebook user's father?

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...

like image 246
Simon_Weaver Avatar asked May 24 '10 03:05

Simon_Weaver


1 Answers

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.

like image 68
typeoneerror Avatar answered Oct 31 '22 18:10

typeoneerror