title: login vs signup with facebook using iOS SDK
body: <p>In my app, the signup with Facebook process flow goes like this:</p>
  
  <pre><code>signup with Facebook -&gt; setup profile image and username -&gt; home screen
  </code></pre>
  
  <p>…and the login with Facebook process flow goes like this:</p>
  
  <pre><code>login with Facebook -&gt; home screen
  </code></pre>
  
  <p>However in the tutorial provided by Facebook, there's only 1 function which is login. how can I differentiate the process?
  I looked at the function documentation of</p>
  
  <pre><code>[FBSession openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:]
  </code></pre>
  
  <p>It says that the function can run asynchronously (the login UI is not shown even when <code>allowLoginUI</code> is set to YES, therefore the <code>completionHandler</code> is called) or synchronously (the login UI is shown, and then redirect to my app, therefore calling the method <code>- (void)sessionStateChanged:(FBSession *)session state:(FBSessionState) state error:(NSError *)error</code> in the AppDelegate)</p>
  
  <p>So, my question is, IF the method <code>sessionStateChanged</code> is called by my signup function or login function, how can I differentiate them, so that I can navigate to appropriate screen?</p>