I have a RequestListener which is all working, but I can't seem to figure out how to pass a variable to the request listener. Can someone point me in the right way? I am trying to pass the friendID to the fbFriendID inside the onComplete function.
Code:
public void PostOnWall(String friendID, String Message) {
Bundle params = new Bundle();
params.putString("message", Message);
asybcTastRun.request(friendID + "/feed", params, "POST", new PostOnWallRequest(), null);
}
class PostMessageOnWallRequest implements AsyncFacebookRunner.RequestListener {
public void onComplete(String response, Object state) {
String fbResponse = response;
// TODO: I need the "friendID" here
String fbFriendID = "??";
Log.i("fbPost", "Posted on friend:" + fbFriendID + " with response:" + fbResponse);
}
public void onIOException(IOException e, Object state) {
// TODO Auto-generated method stub
}
public void onFileNotFoundException(FileNotFoundException e, Object state) {
// TODO Auto-generated method stub
}
public void onMalformedURLException(MalformedURLException e, Object state) {
// TODO Auto-generated method stub
}
public void onFacebookError(FacebookError e, Object state) {
// TODO Auto-generated method stub
}
}