title: Logging into our site as part of FaceBook authentication on iOS
body: <p>When a user clicks on the login with Facebook button on our website, we call:</p>
  
  <pre><code>https://www.facebook.com/dialog/oauth?client_id=xxxxxxx&amp;
  redirect_uri=http://xxxxx.com/Account/FBLogin&amp;scope=email,publish_stream 
  </code></pre>
  
  <p>Inside of our FBLogin (string code) method we do two things. First we call:</p>
  
  <pre><code>"https://graph.facebook.com/oauth/access_token?client_id=xxxxxxxxx&amp;
  redirect_uri=http://xxxxxx.com/Account/FBLogin&amp;client_secret=xxxxxxxxxxxxx&amp;code=" + code;
  </code></pre>
  
  <p>Then, if the FaceBook login was successful, we login the user into our site.</p>
  
  <p>What is the equivalent of this workflow in iOS?  We basically want to authenticate the user on our servers as part of the Facebook authentication. So when the Facebook authentication returns successfully, our user is also logged into our system.</p>
  
  <p>Many thanks!</p>