title: How to process the response data of FBSDKGraphRequest in Swift 3
body: <p>I have integrated the FB latest SDK(non-swift) and log in is working fine.  All I need to know how do I parse the Graph response data since its not a valid JSON</p>
  
  <p>Working code: </p>
  
  <pre><code>     func configureFacebook()
          {
              login.readPermissions = ["public_profile", "email", "user_friends"];
              login.delegate = self
          }
  
  
  func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error!) {
      print("Login buttoon clicked")
      let graphRequest:FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me", parameters: ["fields":"first_name,email, picture.type(large)"])
  
      graphRequest.start(completionHandler: { (connection, result, error) -&gt; Void in
  
          if ((error) != nil)
          {
              // Process error
              print("Error: \(error)")
          }
          else
          {
              print(result)
  
          }
      })
  }
  </code></pre>
  
  <p>With output:</p>
  
  <pre><code>Login button clicked
  Optional({
      "first_name" = KD;
      id = 10154CXXX;
      picture =     {
          data =         {
              "is_silhouette" = 0;
              url = "https://scontent.xx.fbcdn.net/v/t1.0-1/p200x200/XXXn.jpg?oh=a75a5c1b868fa63XXX146A";
          };
      };
  })
  </code></pre>
  
  <p>So what format should I convert the above data to get values like URL or first_name etc? </p>
  
  <p>Also I tried converting to <code>NSDictionary</code> and got error:</p>
  
  <pre><code>func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error!) {
          print("Login buttoon clicked")
          let graphRequest:FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me", parameters: ["fields":"first_name,email, picture.type(large)"])
  
          graphRequest.start(completionHandler: { (connection, result, error) -&gt; Void in
  
              if ((error) != nil)
              {
                  print("Error: \(error)")
              }
              else
              {
                  do {
  
                  let fbResult = try JSONSerialization.jsonObject(with: result as! Data, options: JSONSerialization.ReadingOptions.mutableContainers) as! NSDictionary
                  print(fbResult.value(forKey: "name"))
  
  
                  } catch {
                      print(error)
                  }
  
              }
          })
      }
  </code></pre>