Facebook上的视频上传来自android

时间:2011-05-27 12:08:12

标签: android facebook-graph-api

尝试从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());

0 个答案:

没有答案