Facebook已經給了我「user_likes」,「user_bithday」等的許可,但我仍然沒有收到它的數據,結果總是得到空白字典。請幫我解決它。沒有得到Facebook圖形API響應
-(void)loginButtonClicked {
FBSDKLoginManager* lm = [[FBSDKLoginManager alloc] init];
lm.loginBehavior = FBSDKLoginBehaviorSystemAccount;
[lm logInWithReadPermissions:@[@"public_profile", @"email", @"user_birthday", @"user_likes"] fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (!error && !result.isCancelled)
{
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me/likes" parameters:@{@"fields":@"id, name, first_name, last_name, picture.type(large), email, birthday, likes"}]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (!error) {
NSLog(@"fetched detail: %@",result);
}
}];
}
}];
}
你打電話給我/喜歡API來獲取所有這些細節? – kb920
檢查此問題http://stackoverflow.com/questions/33513630/how-to-get-email-id-of-user-using-facebook-sdk-4-7-in-ios-9/33513692#33513692 – kb920
是實際上,我看到某個地方以這種方式使用它 –