title: swift: FB Fast Switching Between login
body: <p>For some reason I cannot figure this out. I am trying to get the app to switch straight to the view after I click the login button. I have facebook installed on the device. However, at the moment it keeps opening safari first</p>
  
  <h1>ViewController Action</h1>
  
  <pre><code>func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error: NSError!)
  {
  ...
  }
  </code></pre>
  
  <p>FBSDKLoginButton refers to:</p>
  
  <pre><code>public class FBSDKLoginButton : FBSDKButton {
  
  /*!
   @abstract The default audience to use, if publish permissions are requested at login time.
   */
  public var defaultAudience: FBSDKDefaultAudience
  /*!
   @abstract Gets or sets the delegate.
   */
  @IBOutlet weak public var delegate: FBSDKLoginButtonDelegate!
  /*!
   @abstract Gets or sets the login behavior to use
   */
  public var loginBehavior: FBSDKLoginBehavior
  /*!
   @abstract The publish permissions to request.
  
   @discussion Use `defaultAudience` to specify the default audience to publish to.
   Note this is converted to NSSet and is only
   an NSArray for the convenience of literal syntax.
   */
  public var publishPermissions: [AnyObject]!
  /*!
   @abstract The read permissions to request.
  
   @discussion Note, that if read permissions are specified, then publish permissions should not be specified. This is converted to NSSet and is only
   an NSArray for the convenience of literal syntax.
   */
  public var readPermissions: [AnyObject]!
  /*!
   @abstract Gets or sets the desired tooltip behavior.
   */
  public var tooltipBehavior: FBSDKLoginButtonTooltipBehavior
  /*!
   @abstract Gets or sets the desired tooltip color style.
   */
  public var tooltipColorStyle: FBSDKTooltipColorStyle
  }
  </code></pre>
  
  <h1>Clarification of Question</h1>
  
  <p>How do I get the app to detect the settings already saved in the facebook app and switch straight to the view?</p>
  
  <p>I am new to doing this and I am slightly out of my depth. if someone could help me that would be awesome. </p>