Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 从facebook登录用户详细信息_Ios_Iphone_Objective C_Facebook - Fatal编程技术网

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