我正在使用适用于 Android 的 FB API 3.0,根据我使用的会话示例
Request request = Request.newUploadPhotoRequest(Session.getActiveSession(), image, new Request.Callback();
上传图像。
我需要向该图像添加一些默认文本,但我不知道将其放在哪里。
在旧 API 中,发送了一组参数:
params.putByteArray("picture", imgData);
params.putString(Facebook.TOKEN, accessToken);
params.putString("caption", MyGlobals.INSTANCE.activeSetting.f_name);
将文本添加到 newUploadPhotoRequest 的请求的正确方法是什么?
tnx.
创建请求后、执行请求之前,您可以执行以下操作:
// 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);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)