IOS SWIFT: You have already authorized facebook ios
<p>hello I am using Facebook login SDK for my IOS SWIFT APP. I want to know how can I detect this event(if user is already authorized) and redirect him to the HomeScreen without staying there. At the moment what is happening is once this below screen shows up, I presses the done button or ok button and  still it shows the login screen.</p>

<p><a href="https://i.stack.imgur.com/FurQn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FurQn.jpg" alt="enter image description here"></a></p>

<pre><code> @IBAction func loginFacebookButton(sender: UIButton) {



        let fbLoginManager : FBSDKLoginManager = FBSDKLoginManager()

        fbLoginManager .logInWithReadPermissions(["email"], fromViewController: self) { (result, error) -&gt; Void in

            if (error == nil){
                let fbloginresult : FBSDKLoginManagerLoginResult = result
                  if fbloginresult.grantedPermissions != nil {
                    dispatch_async(dispatch_get_main_queue()) {
                        self.view.addSubview(self.progressHUD)
                    }
                if(fbloginresult.grantedPermissions.contains("email"))
                {



                    self.getFBUserData()
                    //fbLoginManager.logOut()
                }else{

                print("sorry")

                }
                }}
        }
    }


    func getFBUserData(){
        if((FBSDKAccessToken.currentAccessToken()) != nil){
           // print("token not nill")
            FBSDKGraphRequest(graphPath: "me", parameters: ["fields": "id, name, first_name, last_name, picture.type(large), email"]).startWithCompletionHandler({ (connection, result, error) -&gt; Void in
                if (error == nil){
                    var facebook = Facebook()
                    facebook.authenticationToken = FBSDKAccessToken.currentAccessToken().tokenString
                    facebook.email = result["email"] as? String
                    facebook.firstName = result["first_name"] as? String
                    facebook.lastName = result["last_name"] as? String
                    facebook.facebookID = result["id"] as? String

                    self.sendFBDataToServer(facebook)

                }
            })
        }
    }
</code></pre>