facebook android sdk中的{image data}是什么

facebook android sdk中的{image data}是什么,android,facebook,Android,Facebook,这是facebook的示例 Bundle params = new Bundle(); params.putString("source", "{image-data}"); /* make the API call */ new Request( session, "/me/photos", params, HttpMethod.POST, new Request.Callback() { public void onCompleted(

这是facebook的示例

Bundle params = new Bundle();
params.putString("source", "{image-data}");
/* make the API call */
new Request(
    session,
    "/me/photos",
    params,
    HttpMethod.POST,
    new Request.Callback() {
        public void onCompleted(Response response) {
            /* handle the result */
        }
    }
).executeAsync();
什么是{图像数据}

我尝试使用byte[].toString,file.toString,文件路径。不工作。 那么如何用这个api上传照片呢?

facebook文档是错误的。 改变


如果您想发布照片,请使用Request.newUploadPhotoRequest方法之一,它将为您设置所有内容

params.putString("source", "{image-data}");
params.putByteArray("source", "{image-data}");