iphoneiosfbconnect

how to access family details from facebook using fbconnect in iphone?


in my new application i want to access family members from facebook including members photos. am accessing users details such as name and photos.

I am using the permission to access data from facebook is shown below

mPermission =  [NSArray arrayWithObjects:@"read_stream", @"publish_stream", @"offline_access",@"email",@"publish_checkins",@"manage_notifications",@"friends_photos",@"user_photos",nil];
    mFacebook = [[Facebook alloc] initWithAppId:kAppId andDelegate:self];      

NSMutableDictionary * paramss = 

[NSMutableDictionary dictionaryWithObjectsAndKeys:@"SELECT uid FROM user WHERE is_app_user  AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())",@"query",nil];

[mFacebook requestWithMethodName:@"fql.query"
                       andParams:paramss
                   andHttpMethod:@"POST"
                     andDelegate:self];

How can i get family details ..?


Solution

  • Facebook has a detailed explanation about how to query for a user's family. Check this link to read all about it.

    They require you to have the additional permission called 'user_relationships'. Then you can query the family table. It provides the family member's name, birthday and relationship status.

    For the profile picture you must (if I'm correct) fetch these from the user table using the UID from the family member, should be possible with a join. Look for the columns that start with 'pic'.