Facebook API 3.0. - 添加捆绑信息到图像上传

Bal*_*yto 2 android facebook

我正在使用FB API 3.0 for Android,并根据Session I的示例使用

Request request = Request.newUploadPhotoRequest(Session.getActiveSession(), image, new Request.Callback();
Run Code Online (Sandbox Code Playgroud)

上传图片 我需要为此图像添加一些默认文本,但我无法弄清楚它放在哪里.

在旧API中,发送了一组参数:

params.putByteArray("picture", imgData);
params.putString(Facebook.TOKEN, accessToken);
params.putString("caption", MyGlobals.INSTANCE.activeSetting.f_name);
Run Code Online (Sandbox Code Playgroud)

向Request for newUploadPhotoRequest添加文本的正确方法是什么?

TNX.

C A*_*thy 7

创建请求之后,在执行之前,您可以执行以下操作:

// Get the current parameters for the request
Bundle params = request.getParameters();
// Add the parameters you want, the caption in this case
params.putString("name", "My Caption String");
// Update the request parameters
request.setParameters(params);

// Execute the request
Request.executeBatchAsync(request);
Run Code Online (Sandbox Code Playgroud)