I'm trying to upload video with RestFB, I tried do this for 2 days, but still can't do it, can somebody help me with this? What I've done.
I know that I can upload video with this method video.upload, and I must send request to the Facebook video server, so I create class VideoLegacyFacebookClient
, and put there this server, also I tried make new execute method, which take a InputStream binaryAttachement
for video, and try to make this code:
InputStream is=new DataInputStream(new FileInputStream(new File("/home/hagen/testing.avi")));
postId = facebookClient.execute("video.upload", null, String.class,is,
Parameter.with("title", "My Test Video"),
Parameter.with("description", "This is description"));
What did I do wrong, can someone help me?