Upload Video to Facebook Problems
<p>I have gone through the post  <a href="http://stackoverflow.com/questions/7279510/upload-video-to-facebook">Upload to Facebook</a> but where do i call the function of <strong><em>uploadvideo</em></strong>.. <br>
I have also imported the facebook sdk and the sample project into workspace pls help me.
I have added the code into the AsyncFacebookRunner class should i have copied the code somewhere else.</p>

<p>This is my code that i have copied to AsyncFacebookRunner class</p>

<pre><code>public  void uploadVideosFacebook(String videoPath) { 
            byte[] data = null;

    String dataMsg = "Video Desc.";
    String dataName="aaaassss.mp4";
    Bundle param;

    AsyncFacebookRunner mAsyncRunner = new   AsyncFacebookRunner(fb);
    InputStream is = null;
    try {
       is = new FileInputStream("/mnt/sdcard/aaaassss.mp4");
       data = readBytes(is); 

       param = new Bundle();
       param.putString("message", dataMsg);
       param.putString("filename", dataName);
       param.putByteArray("video", data);
       mAsyncRunner.request("me/videos", param, "POST", new fbRequestListener(), null);



    } catch (FileNotFoundException e) {
       e.printStackTrace();
    } catch (IOException e) {
       e.printStackTrace();
    }
}



public byte[] readBytes(InputStream inputStream) throws IOException {
      // this dynamically extends to take the bytes you read
      ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();

      // this is storage overwritten on each iteration with bytes
      int bufferSize = 1024;
      byte[] buffer = new byte[bufferSize];

      // we need to know how may bytes were read to write them to the byteBuffer
      int len = 0;
      while ((len = inputStream.read(buffer)) != -1) {
        byteBuffer.write(buffer, 0, len);
      }

      // and then we can return your byte array.
      return byteBuffer.toByteArray();
}


public class fbRequestListener implements RequestListener {

    @Override
    public void onComplete(String response, Object state) {
        // TODO Auto-generated method stub
        Log.d("RESPONSE",""+response);

    }

    @Override
    public void onIOException(IOException e, Object state) {
        // TODO Auto-generated method stub
        Log.d("RESPONSE",""+e);

    }

    @Override
    public void onFileNotFoundException(FileNotFoundException e,
            Object state) {
        // TODO Auto-generated method stub
        Log.d("RESPONSE",""+e);

    }

    @Override
    public void onMalformedURLException(MalformedURLException e,
            Object state) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onFacebookError(FacebookError e, Object state) {
        // TODO Auto-generated method stub
        Log.d("RESPONSE",""+e);

    }

    }
</code></pre>

<p>and this is what i use when i call the onclick</p>

<pre><code>public void onClick(View v) 
{
                  AsyncFacebookRunner.uploadVideosFacebook("/mnt/sdcard/aaaassss.mp4");
           }
</code></pre>

<p>My doubt is that 'm i calling the function correctly as once i run this i get an error saying the uploadVideosFacebook method should be converted to static i dont think this is right.</p>
