- (void)fbDidLogin {
//some best practice boiler plate code for storing important stuff from fb
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
[defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
[defaults synchronize];
//now load all my friend's birthdays
NSMutableDictionary * params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
@"select birthday, name, uid, pic_square from user where uid in (select uid2 from friend where uid1=me()) order by name",
@"query",
nil];
[self.facebook requestWithMethodName: @"fql.query" andParams: params andHttpMethod: @"POST" andDelegate: self];
}
これは最初の友達の詳細だけを取得します。すべての友達の詳細を取得する方法.