Access parent variable with callback
<p>I am working with the facebook sdk and am trying to modify a variable in a parent function (that's what I would call it at least).</p>

<p>How can i modify the variable "actor" (marked)?</p>

<pre><code>public void getUserFeed(int limit) {
    String q = ""; // query taken out
     Bundle params = new Bundle();
     params.putString("q", q);
     Session session = Session.getActiveSession();
     Request request = new Request(session,
         "/fql",                         
         params,                         
         HttpMethod.GET,   
         new Request.Callback(){    
            public void onCompleted(Response response) {
                 GraphObject graphObject = response.getGraphObject();
                 if (graphObject != null) {
                     JSONObject jsonObject = graphObject.getInnerJSONObject();
                     try {
                      JSONArray array = jsonObject.getJSONArray("data");
                      for (int i = 0; i &lt; array.length(); i++) {
                         String q = "" // query taken out
                         Bundle params = new Bundle();
                         params.putString("q", q);
                         String actor = ""; // Trying to access this variable *******
                         Session session = Session.getActiveSession();
                         Request request2 = new Request(session,
                             "/fql",                         
                             params,                         
                             HttpMethod.GET,   
                             new Request.Callback(){    
                                public void onCompleted(Response response) {
                                    GraphObject graphObject = response.getGraphObject();
                                     //String s = textViewResults.getText().toString();
                                     if (graphObject != null) {
                                         JSONObject jsonObject = graphObject.getInnerJSONObject();
                                         try {
                                          JSONArray array = jsonObject.getJSONArray("data");
                                          for (int i = 0; i &lt; array.length(); i++) {
                                              JSONObject object = (JSONObject) array.get(i);
                                              actor = object.getString("name"); // Trying to access "actor" here *******
                                          }
                                         } catch (JSONException e) {
                                             e.printStackTrace();
                                         }
                                     }
                                }
                            });
                        }
                    }
                }
            }
        }
    );
}
</code></pre>
