title: upload video to facebook in android
body: <p><strong>Problem</strong>:</p>
  
  <p>My video isn't being uploaded to Facebook.</p>
  
  <p><strong>Question</strong>:</p>
  
  <p>How can I upload a video to Facebook?</p>
  
  <p><strong>Note</strong>:</p>
  
  <p>I can upload a picture from my gallery.  </p>
  
  <p>There are no <code>Exceptions</code> being thrown. I think there is a problem in the line </p>
  
  <p><code>params.putString("filename", &lt;selectedviedoPath&gt; )</code></p>
  
  <pre><code>AsyncFacebookRunner mAsyncFbRunner = new AsyncFacebookRunner(mFacebook);
          Bundle params = new Bundle();
          //convert to byte stream
     **FileInputStream is = new FileInputStream(new File(selectedviedoPath));**
     ByteArrayOutputStream bs = new ByteArrayOutputStream();
          int data = 0;
          while((data = is.read()) != -1)
          bs.write(data);
  
          is.close();
          byte[] raw = bs.toByteArray();
          bs.close();
  
          params.putByteArray("video", raw);
          params.putString("filename", &lt;selectedviedoPath&gt; );
          mAsyncFbRunner.request("me/videos", params, "POST", new WallPostListener());
  </code></pre>