私は以下のコードを持っています。Facebook API/Android:Wall Post画像の添付ファイルが公開されていません。
メッセージの部分を処理して投稿しますが、添付ファイルの部分は機能しません。 JSONを文字列として渡すことと関係があると思われます。
Facebookに戻る"{"id":"23522646737635675"}
を返します。だからエラーではない。
Bundle params = new Bundle();
params.putString("message", message);
JSONObject attachment = new JSONObject();
attachment.put("href", URLEncoder.encode("http://a.espncdn.com/photo/2010/0523/pg2_a_cricket_576.jpg"));
attachment.put("name", "Cricket Fantasy");
attachment.put("caption", "New team");
attachment.put("description","Description about Application");
JSONObject media = new JSONObject();
media.put("type", "image");
media.put("src", URLEncoder.encode("http://a.espncdn.com/photo/2010/0523/pg2_a_cricket_576.jpg"));
media.put("href", URLEncoder.encode("http://a.espncdn.com/photo/2010/0523/pg2_a_cricket_576.jpg"));
attachment.put("media", media);
params.putString("attachement", attachment.toString());
String response = mFacebook.request("me/feed", params, "POST");