im using facebook login in my app and a want to proceed user to main interface after he logged oon facebook.
Here is how im handling results:
- (void)loginButton:(FBSDKLoginButton *)loginButton didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error {
if (error) {
NSLog(@"FB login failed");
}
else if (result.isCancelled) {
NSLog(@"FB login cancelled");
}
else {
[self performSegueWithIdentifier:@"fbLogin" sender:self];
NSLog(@"User logged in");
}
}
The problem is that in good case my NSLog(@"User logged in");
calls, but segue doesnt perform
Added: Here is my viewDidLoad method to provide login button:
- (void)viewDidLoad {
[super viewDidLoad];
fbLoginButton.readPermissions = @[@"public_profile"];
fbLoginButton.publishPermissions = @[@"publish_actions"];
fbLoginButton.delegate = self;
}
And AppDelegate.m :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
[FBSDKLoginButton class];
[FBSDKShareButton class];
return YES;
}
I also want to say, that login works correctly, its just segue problem