次のコードがあります。
メッセージ部分は機能して投稿しますが、添付部分は機能しません。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");