title: FBSDKAccessToken.currentAccessToken().userID sometimes returning Nil
body: <p>I am trying to create a Profile signup page, and assigning image from Facebook after segued from 'Login with Facebook' page. However on this line...</p>
  
  <pre><code>        let userID = FBSDKAccessToken.currentAccessToken().userID
  </code></pre>
  
  <p>... sometimes it's working excellent but sometimes returning 'nil', and I am getting </p>
  
  <pre><code>  ' 2015-04-16 15:08:41.195 FacebookLogin[65906:4225996] [Error]: invalid session token (Code: 209, Version: 1.7.1) 
   fatal error: unexpectedly found nil while unwrapping an Optional value
   (lldb) '
  </code></pre>
  
  <p>Here is the full code:</p>
  
  <pre><code> override func viewDidLoad() {
      super.viewDidLoad()
  
  
  
      if let currentUser = PFUser.currentUser() {
  
          let accessToken = FBSDKAccessToken.currentAccessToken()
  
          let userID = FBSDKAccessToken.currentAccessToken().userID
  
          println(userID)
          let url = NSURL(string: "https://graph.facebook.com/"+userID+"/picture?width=300&amp;height=300")
  
          let urlRequest = NSURLRequest(URL: url!)
  
  
          NSURLConnection.sendAsynchronousRequest(urlRequest, queue: NSOperationQueue.mainQueue(), completionHandler: {
              response, data, error in
  
  
  
              let image = UIImage(data: data)
  
              self.profilePicture.image = image
  
  
              currentUser.saveInBackground()
  
              })
  
  
  
      }
  
  }
  </code></pre>
  
  <p>How can I find a workaround?</p>