我正在查看适用于 Android 的 facebook SDK 中的示例,但无法弄清楚如何将图像上传到用户的特定相册。我已经完成了身份验证,因此用户可以在必要时上传到私人相册。这是我的上传代码:
public void uploadFacebookPhoto(String description)
{
Bundle params = new Bundle();
params.putString("method", "photos.upload");
params.putByteArray("picture", picData);
params.putString("description", description);
params.putString(SOME_IDENTIFIER, MY_ALBUM);
AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(mFacebook);
mAsyncRunner.request(null, params, "POST", new SampleUploadListener(), null);
}