我试图在用户的墙上发布一条由其 ID 定义的消息,但作为响应,我收到一个错误“未知方法”。
我的代码是:
final Bundle params = new Bundle();
params.putByteArray("message", "Test".getBytes());
params.putByteArray("name", "American Virgin".getBytes());
params.putByteArray("link", "http://bit.ly/12345".getBytes());
params.putByteArray("description", "A Freshman College Girl on a scholarship from an ...".getBytes());
params.putByteArray("picture", "http://xxx/MOV1026.jpg".getBytes());
final Request postToWall = Request.newRestRequest(Session.getActiveSession(),
"/" + pickedUsersId.get(0) + "/feed", params, HttpMethod.POST);
postToWall.setCallback( new Request.Callback()
{
@Override
public void onCompleted(Response response)
{
Log.i(Utils.LOG, response.toString());
}
});
Request.executeBatchAsync(postToWall);
在 LogCat 我有:
11-08 17:34:29.136: I/LOG(21699): {Response: responseCode: 200, graphObject: null, error: {FacebookServiceErrorException: httpResponseCode: 200, facebookErrorCode: 3, facebookErrorType: null, message: Unknown method}, isFromCache:false}