【发布时间】:2012-01-18 14:06:15
【问题描述】:
我想创建一个 Facebook 对话框,如 link 的最后一张图片所示。但我看不到默认消息,也看不到图像。我在link 的帮助下编写了这段代码。
这是相同的代码:
public void postToWall(String message) {
Bundle parameters = new Bundle();
parameters.putString("method", "stream.publish");
JSONObject attachment = new JSONObject();
try {
attachment.put("app_id", APP_ID);
attachment.put("href", MY_URL);
attachment.put("picture", MY_PICTURE_URL);
attachment.put("name", NAME_FOR_URL);
attachment.put("caption", CAPTION_FOR_URL);
attachment.put("description", DESCRIPTION_FOR_URL);
attachment.put("message", MESSAGE);
} catch (JSONException e) {
e.printStackTrace();
}
parameters.putString("attachment", attachment.toString());
facebook.dialog(this, "stream.publish",parameters, new TestUiServerListener());
}
我错过了什么?
【问题讨论】:
标签: android facebook sdk integration publish