0
我试图上传一个使用Facebook SDK和图表API的视频Facebook SDK for Android:无法上传视频
这是我得到一个有效的身份验证令牌后。
Bundle params = new Bundle();
params.putString("source", AssetsUtils.getExportMoviePath(this)); ///data/user/0/com.bundlecomp.appname/files/export.mp4
params.putString("name", "TestName");
params.putString("title", "TestTitle");
params.putString("filename", "export.mp4");
params.putString("description", "Created with http://wwww.test.tu");
Log.d(TAG, "Posting on user wall");
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"me/videos",
params,
HttpMethod.POST,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
Log.d(TAG, "GOT response from facebook. Error : " + response.getRawResponse());
Log.d(TAG, "GOT response from facebook. Error : " + response.getError());
Log.d(TAG, "GOT response from facebook. Resp : " + response);
runOnUiThread(new Runnable() {
@Override
public void run() {
finish();
Log.d(TAG, "Posted");
}
});
}
}
).executeAsync();
不过,我得到以下错误:
{ Response: responseCode: 400, graphObject: null, error: {
HttpStatus: 400, errorCode: 390, errorType: OAuthException,
errorMessage: There was a problem uploading your video file. Please try again. } }
我在做什么错?
外貌喜欢我的来源应该是数据而不是路径... – Antzi