這是我工作的代碼........目前檢查............
try {
JSONObject me = new JSONObject(mFacebook.request("me"));
fbname = me.getString("name");
first_name = me.getString("first_name");
System.out.println("Name :: " + fbname);
System.out.println("FName :: " + first_name);
JSONObject attachment = new JSONObject();
attachment.put("message", "Oil and Gas Navigator");
attachment.put("href", link);
attachment.put("description", "<B>" + title + "" + desc);
Bundle params = new Bundle();
params.putString("attachment", attachment.toString());
JSONObject actionLink = new JSONObject();
actionLink.put("text", "Link");
actionLink.put("href", link);
JSONArray jasonarray = new JSONArray().put(actionLink);
params.putString("action_links", jasonarray.toString());
mFacebook.dialog(mActivity, "stream.publish", params,
new SampleDialogListener());
} catch (Exception ex) {
ex.printStackTrace();
}
它確實已經開始爲我所有的應用程序再次合作,除了一個小的變化 - 取消按鈕不再需要回我的活動,只需重新加載頁面。但是,這是一個單獨的錯誤,我猜。 –