我试图在朋友 fb 墙上发布图像,我得到选择的朋友 ID,以及转换为 base64 字符串的图像只是得到以下错误的响应
{Response: responseCode: 200, graphObject: null, error: {HttpStatus: 200, errorCode: 3, errorType: null, errorMessage: Unknown method}, isFromCache:false}
我的代码如下
if (hasPublishPermission()) {
Request postToWall = new Request();
for (GraphUser friend : selectedFriends) {
Constants.showLog("Selected Frnd", friend.getId());
Constants.showLog("Selected Pic", picture);
Bundle parameters = new Bundle();
parameters.putByteArray("message", "Greetings from Wish Well!".getBytes());
parameters.putByteArray("link", "http://pictwist.cloudganga.com".getBytes());
parameters.putByteArray("picture", picture.getBytes());
parameters.putByteArray("target_id", friend.getId().getBytes());
postToWall = Request.newRestRequest(Session.getActiveSession(), friend.getId() + "/feed", parameters, HttpMethod.POST);
Constants.showToast(getApplicationContext(), "Posted image on friend wall");
}
postToWall.setCallback( new Request.Callback()
{
@Override
public void onCompleted(Response response)
{
Constants.showLog("Responce Posting image", response.toString());
}
});
Request.executeBatchAsync(postToWall);
}
请帮忙