尝试从Android上传视频,但却出错
"{"error":{"type":"OAuthException","message":"(#351) Video file was corrupt or invalid"}}"
无法解决问题所在
Bundle params = new Bundle();
params.putString("name","my video");
try {
AssetManager am = context.getAssets();
InputStream is = am.open("custody.flv");
byte[] vdoData =new byte[1000];
is.read(vdoData);
params.putByteArray("", vdoData);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
params.putString(Facebook.TOKEN,accessToken);
mAsyncRunner.request("me/videos",params,"POST",new SampleRequestListener());