title: getJSONArray() in GraphResponse Cannot be applied to java.lang.String - Facebook
body: <p>i have develop a android application integrate with facebook login now i want to make facebook app invite function(invitable_friends api) but in my code i got red underline errors.</p>
  
  <pre><code>  private void loadFriendsFromFacebook(final String str) {
      final AccessToken accessToken = AccessToken.getCurrentAccessToken();
      new GraphRequest(AccessToken.getCurrentAccessToken(), str, null, HttpMethod.GET,
              new GraphRequest.Callback() {
                  List&lt;String&gt; s = new ArrayList();
                  List&lt;String&gt; F = new ArrayList();
                  List&lt;String&gt; G = new ArrayList();
                  String t = "";
                  String u = "";
                  int w = 0;
                  boolean x = false;
                  String[] y = new String[2];
                  String E = "";
                  OnInviteListener onInviteListener = null;
  
                  public void onCompleted(GraphResponse response) {
                      SharedPreferences.Editor edit = getSharedPreferences("friendsData", 0).edit();
  
                      try {
                  int i;
                  JSONArray jSONArray = response.getJSONArray("data");
                  for (i = 0; i &lt; jSONArray.length(); i++) {
                      this.s.add(jSONArray.getJSONObject(i).getString(Page.Properties.ID));
                  }
                  for (i = 0; i &lt; jSONArray.length(); i++) {
                      this.G.add(jSONArray.getJSONObject(i).getJSONObject(Page.Properties.PICTURE).getJSONObject("data").getString("url"));
                      edit.putString("friendPhoto", jSONArray.getJSONObject(i).getJSONObject(Page.Properties.PICTURE).getJSONObject("data").getString("url"));
                      this.F.add(jSONArray.getJSONObject(i).getString(Page.Properties.NAME));
                      edit.putString("friendName", jSONArray.getJSONObject(i).getString(Page.Properties.NAME));
                  }
                  edit.commit();
                  for (i = 0; i &lt; this.s.size(); i++) {
                      this.u += ((String) this.s.get(i)) + ",";
                  }
                  JSONObject jSONObject2 = response.getJSONObject("paging");
                  if (jSONObject2.toString().contains("next")) {
                      this.t = jSONObject2.getString("next").toString();
                  } else if (this.s.size() &lt; 1) {
                      this.x = true;
                  }
  
              } catch (Exception e) {
                  System.out.println("Exception=" + e);
                  e.printStackTrace();
              }
  
          }
      }).executeAsync();
  
  }
  </code></pre>
  
  <p>where the response.getJSONArray("data"); </p>
  
  <p>data is underline red which is click rover shows getJSONArray() in graphrespone cannot be applied to java.lang.sting.. </p>
  
  <p>and same error in the response.getJSONObject("paging");</p>
  
  <p>Can anyone please tell me what is wrong in the code?
  it will be appreciated..</p>