我正在尝试使用facebook SDK和图形API上传视频
这是在我获得有效的身份验证令牌之后。
> Open .svn folder
> Open wc.db file with notepad or notepad++.
> Scroll the document and you will find the URL
但是我收到以下错误:
{响应:responseCode:400,graphObject:null,错误:{
HttpStatus:400,errorCode:390,errorType:OAuthException,
errorMessage:上传视频文件时出现问题。请 再试一次。 }}
我做错了什么?
答案 0 :(得分:1)
以下是我使用的内容:
Bundle params = new Bundle();
try {
params.putByteArray("video.mp4", Files.toByteArray(new File(AssetsUtils.getExportMoviePath(this))));
} catch (IOException pE) {
pE.printStackTrace();
}
params.putString("name", "TestName");
params.putString("title", "TestTitle");
params.putString("filename", "video.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) {
runOnUiThread(new Runnable() {
@Override
public void run() {
finish();
Log.d(TAG, "Posted");
}
});
}
}
).executeAsync();