Moving View Controllers After Successful Facebook Login

Hi everyone,

I’ve integrated the FacebookSDK in my app so users will be able to log in through Facebook. Facebook authentication is working, but when the user logs in the view controller does not move past the sign-in page. ie: the authentication works, but not the transition onto the next view controller.

I’ve tried the following code:

if (AccessToken.current != nil) {

         let storyboard = UIStoryboard(name: "Main", bundle: nil)
            let vc = storyboard.instantiateViewController(withIdentifier: "ListingsVC")
        self.navigationController?.pushViewController(vc, animated: true)


But when I run this, the app opens on the ‘Listings’ View Controller immediately rather than the sign-in view controller.

Would anyone know what the issue is?