我在日志猫中遇到错误
{Response: responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 353, errorType: OAuthException, errorMessage: (#353) Missing video file}, isFromCache:false}
使用以下方法
private void postVideo() {
try {
File file = new File(videoPath);
ParcelFileDescriptor descriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
Bundle parameters = new Bundle(1);
parameters.putParcelable(file.getName(), descriptor);
new Request(Session.getActiveSession(), "me/videos", parameters, HttpMethod.POST, new Request.Callback() {
@Override
public void onCompleted(Response response) {
Constants.showLog(TAG, "In Response " + response.getGraphObject().getProperty("id"));
JSONObject graphResponse = response.getGraphObject().getInnerJSONObject();
String postId = null;
try {
postId = graphResponse.getString("id");
Constants.showLog(TAG, "In Response id " + postId);
} catch (JSONException e) {
Constants.showLog(TAG,"JSON error "+ e.getMessage());
}
}
}).executeAsync();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
请帮忙