Ios 从facebook登录用户详细信息
这是我的密码。但它失败了,不允许我做进一步的处理。让我知道这是怎么回事Ios 从facebook登录用户详细信息,ios,iphone,objective-c,facebook,Ios,Iphone,Objective C,Facebook,这是我的密码。但它失败了,不允许我做进一步的处理。让我知道这是怎么回事 ACAccountStore *accountStore = [[ACAccountStore alloc] init]; ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; [accountStore requestAccessToAccountsW
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[accountStore requestAccessToAccountsWithType:accountType
options: @{ACFacebookAppIdKey: @"640154745965666",
ACFacebookPermissionsKey: [NSArray arrayWithObjects:@"email", nil],
ACFacebookAudienceKey: ACFacebookAudienceFriends
}
completion:^(BOOL granted, NSError *error) {
if(granted){
NSLog(@"granted");
}
else {
NSLog(@"fail ");
}
}];
使用iOS6帐户API进行身份验证时会发生这种情况。你所要做的就是:-登录developers.facebook.com-将你的应用程序设置为iOS原生应用程序-输入你的应用程序包ID