How to call a method with parameters from within another method
Sorry experts for asking this starting question.
public void postOnWall(String msg) {
Log.d("Tests", "Testing graph API wall post");
try {
String response = facebook.request("me");
Bundle parameters = new Bundle();
parameters.putString("message", msg);
parameters.putString("description", "test test test");
response = facebook.request("me/feed", parameters,
"POST");
Log.d("Tests", "got response: " + response);
if (response == null || response.equals("") ||
response.equals("false")) {
Log.v("Error", "Blank response");
}
} catch(Exception e) {
e.printStackTrace();
}
}`
i want to call this method from another method onClick()how to call above
method in this
btnPostToWall.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//postToWall();
}
});
No comments:
Post a Comment