title: Getting JSONObject values of Facebook Login User
body: <p>I'm simply trying to get the ID, Name, and profile pic URL of the logged in Facebook User.</p>
  
  <p>I have this:</p>
  
  <pre><code> GraphRequest request = GraphRequest.newMeRequest(
     loginResult.getAccessToken(),
     new GraphRequest.GraphJSONObjectCallback() {
                 @Override
                   public void onCompleted(
                     JSONObject object,
                GraphResponse response) {
                // Application code
                 response.getError();
        Log.e("JSON:", object.toString());
  
  try {
    user_id =object.getJSONObject("").getString("id");
    name =object.getJSONObject("").getString("name");
    profilepic_url =object.getJSONObject("").getString("link");
     } catch (JSONException e) {
        e.printStackTrace();
    }
  
   });
           Bundle parameters = new Bundle();
           parameters.putString("fields", "id,name,link");
            request.setParameters(parameters);
          //Log.e(" About to Graph Call", " ");
          request.executeAsync();
           //Log.e(" Finished Graph Call", " ");
  }
  </code></pre>
  
  <p>However, all the strings are null. Um....and this is my output once I log the JSONObject...</p>
  
  <pre><code>05-26 20:28:41.426    8248-8248/com.ro.hitup1_0 E/JSON:﹕ 
  
  {
  
  "id":"10202628284866677",
  
  "name":"Rohit Tigga",
  
  "link":"https:\/\/www.facebook.com\/app_scoped_user_id\/10202628284866677\/"
  
  }
  </code></pre>
  
  <p>I'm not sure what exactly is the problem. THe jsonobject doesn't have a name. So according to this: </p>
  
  <p><a href="https://stackoverflow.com/questions/7451600/jsonobject-how-to-get-a-value">JSONObject - How to get a value ?</a></p>
  
  <p>or </p>
  
  <p><a href="https://stackoverflow.com/questions/5566669/how-to-parse-a-json-object-in-android">How to Parse a JSON Object In Android</a></p>
  
  <p>Shouldn't what I'm doing work? What am I doing wrong and how to fix it? </p>