title: Attempt to present *ViewController* on <SFAuthenticationViewController: 0x7fce13803600> whose view is not in the window hierarchy
body: <p>I have a Facebook login button on my app's login page. The web-view part of the log-in proceeds without a hitch, but all it does is change the Facebook button title to <code>"Log Out"</code>, instead of progressing with presenting the next view controller. </p>
  
  <p>Here is the log:</p>
  
  <pre><code>Attempt to present &lt;ViewController: 0x7fce11c29450&gt; on &lt;SFAuthenticationViewController: 0x7fce13803600&gt; whose view is not in the window hierarchy!
  </code></pre>
  
  <p>Here's the code I'm using to log into facebook:</p>
  
  <pre><code>func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error!) {
          self.view.endEditing(true)
          let connection = GraphRequestConnection()
          connection.add(GraphRequest(graphPath: "/me", parameters: ["fields": "email, id, first_name, last_name, gender, birthday, name, picture.width(480).height(480)"])) { httpResponse, result in
              switch result {
              case .success(let response):
                  if let resultDictionary = response.dictionaryValue {
                      AuthService.sharedInstance.loginFacebookUser(userDetails: resultDictionary as NSDictionary, completion: { (result) in
                          if result == "Success" {
                              self.goToMovies()
                          } else {
                              self.alert(result)
                          }
                      })
                  } else {
                      self.alert("There was an error logging in with Facebook. Please try again.")
                  }
              case .failed:
                  self.alert("There was an error logging in with Facebook. Please try again.")
              }
          }
          connection.start()
      }
  </code></pre>
  
  <p>And here is the implementation for <code>goToMovies()</code>, the function where I instantiate the view controller I want to present:</p>
  
  <pre><code>func goToMovies() {
          let progressViewController = self.storyboard?.instantiateViewController(withIdentifier: "ProgressViewController") as! ProgressViewController
          self.show(progressViewController, sender: self)
      }
  </code></pre>