When you try to log in using the Facebook application, SDK returns error:
Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={_kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}
The error is not reproduced in the case of authorization through Safari, only through the application and not every time.
My code:
- (IBAction)loginFacebook:(UIButton *)sender { FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; [login logOut]; [login logInWithReadPermissions: @[@"public_profile",@"email"] fromViewController:self handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { if (error) { [self showError:error]; } else if (result.isCancelled) { NSLog(@"Cancelled"); } else { [LoadingView startLoading:@"" inView:[[UIApplication sharedApplication].delegate window] isProgress:NO showWithCheckmark:NO]; [[BackendService sharedBackendService] fbLoginWithAccessToken:result.token.tokenString successBlock:^() { [_errorView removeFromSuperview]; _errorView = nil; STOP_LOADING [self showMainVC]; } errorBlock:^(NSError *error) { STOP_LOADING [self showError:error]; }]; } }]; }
#objective-c