title: Retrieve Facebook user ID in Swift
body: <p>I have a helper function that is grabbing the picture from a specific URL:</p>
  
  <pre><code>func getProfilePicture(fid: String) -&gt; UIImage? {
      if (fid != "") {
          var imageURLString = "http://graph.facebook.com/" + fid + "/picture?type=large"
          var imageURL = NSURL(string: imageURLString)
          var imageData = NSData(contentsOfURL: imageURL!)
          var image = UIImage(data: imageData!)
          return image
      }
      return nil
  }
  </code></pre>
  
  <p>I proceed to call getProfilePicture() with the user's Facebook ID, and store the output into a UIImageView. My question is, how can I find a Facebook user's ID? Do I request a connection through Facebook? It would be helpful if some code is provided here.</p>
  
  <p>Thank you for your help.</p>