I have the Facebook sdk integrated in my Android application and whenever I press the a button I want to be able to post a particular message (given by code) to be shown on the user's wall. I have written the following code up till now :
public void showFacebookDialog(String message) {
// post on user's wall.
// mFacebook.authorize(this, new PostDialogListener());
Bundle parameters = new Bundle();
//parameters.putString("message", "Some message");// the message to post
parameters.putString("app_id", "my_id");
parameters.putString("caption", "some caption");
parameters.putString("description", "some description");
// to the wall
mFacebook.dialog(GameActivity.this, "feed", parameters,
new PostDialogListener());// "stream.publish" is an API call
// mFacebook.dialog(this, "feed", new PostDialogListener());
}
This is not working. I am not able to set a pre populated message inside the dialog box that is showing up. How do I go about this ?
Thank you in advance.