title: Swift: Facebook Access Token is always returned even after removing App from Facebook settings
body: <p>I'm using the Facebook SDK to login and progress through my app. When a user removes the app permissions from their Facebook page and then reopens the app, I want it to go to the very first view controller, which asks the user to log into Facebook. However, I'm running into the problem where the user is still able to access the app even after removing the permissions.</p>
  
  <p><strong>So, how it should work:</strong></p>
  
  <p>i) User goes to Facebook profile and removes app permissions from settings</p>
  
  <p>ii) User completely closes down my app from iPhone.</p>
  
  <p>iii) User reopens my app and the "Log into Facebook" view controller should appear.</p>
  
  <p><strong>Instead, what happens:</strong></p>
  
  <p>i) User goes to Facebook profile and removes app permissions from settings</p>
  
  <p>ii) User completely closes down my app from iPhone.</p>
  
  <p>iii) User reopens my app, and my app opens up in a different view controller that should only come up after user has logged in.</p>
  
  <p><strong>AppDelegate.swift</strong></p>
  
  <pre><code>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -&gt; Bool {
  
      // Override point for customization after application launch.
      GMSServices.provideAPIKey("MY_API_KEY")
      GMSPlacesClient.provideAPIKey("MY_API_KEY")
  
      // FACEBOOK API STUFF
  
      FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
      print(FBSDKAccessToken.current())
  
      let storyboard = UIStoryboard(name: "Main", bundle: nil)
      self.window = UIWindow(frame: UIScreen.main.bounds)
  
      if(FBSDKAccessToken.current() != nil){
  
          print(FBSDKAccessToken.current())
  
          let initialViewController = storyboard.instantiateViewController(withIdentifier: "main")
  
          self.window?.rootViewController = initialViewController
          self.window?.makeKeyAndVisible()
      }
      else{
  
          print(FBSDKAccessToken.current())
          let initialViewController = storyboard.instantiateViewController(withIdentifier: "facebookLogin")
  
          self.window?.rootViewController = initialViewController
          self.window?.makeKeyAndVisible()
      }
      return true
  }
  </code></pre>