2

Facebook オブジェクト API を使用して、Facebook ステージング サービスに画像をアップロードしています。API ドキュメントはこちら http://developers.facebook.com/docs/opengraph/using-object-api/

ドキュメントでは、curl を使用して画像をアップロードします。

curl -X POST https://graph.facebook.com/me/staging_resources -F file=@images/prawn-curry-1.jpg -F access_token=$USER_ACCESS_TOKEN

Androidアプリでhttpポストリクエストを使用して同じ機能を実現するにはどうすればよいですか?

どうもありがとう!

4

2 に答える 2

0

Android から写真を投稿する方法を知っていれば、これは何ら変わりはありません。

Bundle params = new Bundle();
params.putByteArray("file", data);

Request request = new Request(
    Session.getActiveSession(),
    "me/staging_resources",
    params,
    HttpMethod.POST
);
Response response = request.executeAndWait();
// handle the response
于 2013-05-04T17:29:29.033 に答える