1

I'm using Facebook login in my app and I'm not able to go to next view after login completed.

i.e. TabBarController its shows an above stated error. I am doing custom login from a button. Here is my code of how I am doing login.

@IBAction func fbLoginBtn(sender: AnyObject) {
    facebookLogin.logInWithReadPermissions(["email","user_friends","user_posts"],fromViewController: self, handler: { (response:FBSDKLoginManagerLoginResult!, error: NSError!) in

        if error != nil {
            print(error.localizedDescription)
            print("Facebook login failed")
        } else {
            let accessToken = response.token.tokenString
            print(accessToken)
            print("Successfully login.\(accessToken)")
            self.performSegueWithIdentifier("showMain", sender: self)
        }
    })
}

After login I'm performing segue to go to next view i.e. TabBarController. If anyone can help please help me. Thank you.

Ekta Padaliya
  • 5,743
  • 3
  • 39
  • 51
shahin ali agharia
  • 1,629
  • 4
  • 21
  • 36

0 Answers0