title: Facebook iOS sdk to take user id
body: <p>a question about Facebook sdk for iOS.</p>
  
  <p>If I have an active session how can I get only the user ID?</p>
  
  <p>Is there a simple way to obtain this id without use this example code?</p>
  
  <pre><code>if (FBSession.activeSession.isOpen) {
          [[FBRequest requestForMe] startWithCompletionHandler:
           ^(FBRequestConnection *connection, NSDictionary&lt;FBGraphUser&gt; *aUser, NSError *error) {
               if (!error) {
                   // I can take the user id..
               }
           }];
      }
  </code></pre>