我在我的Android应用程序中集成了Facebook sdk,每当我按下按钮时,我希望能够发布特定消息(由代码给出)以显示在用户的墙上。到目前为止,我已经编写了以下代码:
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());
}
这不起作用。我无法在显示的对话框中设置预先填充的消息。我该怎么做?
提前谢谢。
答案 0 :(得分:2)
将忽略message参数。根据Facebook政策,您无法预先填充此字段。只有用户可以是设置消息的用户。