Ios Facebook SDK4.0[FBSDKInternalUtility isFacebookAppInstalled]:发送到类的无法识别的选择器
代码:Ios Facebook SDK4.0[FBSDKInternalUtility isFacebookAppInstalled]:发送到类的无法识别的选择器,ios,facebook,Ios,Facebook,代码: 我在facebook登录集成中使用了上述代码。它的预期值为“+[FBSDKInternalUtility isFacebookAppInstalled]:未识别的选择器发送到类中”。我哪里出错了?请提供帮助。我刚刚在测试数据上测试了您的代码,它可以正常工作,是否确保导入FBSDKLoginKit模块?可能在viewcontroller中像这样导入模块:@import FBSDKLoginKit;对它已导入。让我删除并再次添加它。这很奇怪,它对我来说运行正常,没有问题,您是否正在使用生产构
我在facebook登录集成中使用了上述代码。它的预期值为“+[FBSDKInternalUtility isFacebookAppInstalled]:未识别的选择器发送到类中”。我哪里出错了?请提供帮助。我刚刚在测试数据上测试了您的代码,它可以正常工作,是否确保导入FBSDKLoginKit模块?可能在viewcontroller中像这样导入模块:@import FBSDKLoginKit;对它已导入。让我删除并再次添加它。这很奇怪,它对我来说运行正常,没有问题,您是否正在使用生产构建应用程序来测试它?还是你在使用Facebook提供的“假用户”?你的应用程序是在Facebook上,还是仍处于开发模式,你只能使用测试用户?我的xcode有问题。我也在另一个in系统中尝试过,它工作正常,谢谢你的帮助..我刚刚在测试数据上测试了你的代码,它工作正常,你确定要导入FBSDKLoginKit模块吗?也许在你的viewcontroller中导入这样的模块:@import FBSDKLoginKit;对它已导入。让我删除并再次添加它。这很奇怪,它对我来说运行正常,没有问题,您是否正在使用生产构建应用程序来测试它?还是你在使用Facebook提供的“假用户”?你的应用程序是在Facebook上,还是仍处于开发模式,你只能使用测试用户?我的xcode有问题。我也在另一个in系统中尝试过,它工作得很好,谢谢你的帮助。。
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logInWithReadPermissions: @[@"public_profile"]
handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
NSLog(@"Process error");
} else if (result.isCancelled) {
NSLog(@"Cancelled");
} else {
NSLog(@"result:%@", result);
if ([FBSDKAccessToken currentAccessToken]) {
[[[FBSDKGraphRequest alloc] initWithGraphPath:@"me" parameters:@{@"fields": @"id, name, first_name, last_name, birthday, picture"}]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (!error) {
NSLog(@"fetched user:%@", result);
}
}];
}
NSLog(@"Logged in");
}
}];