I am trying to upload video from the iPhone application using FBConnect. Actually I have tried several ways but unfortunately without any success.
First. Using “facebook.video.upload” REST method and tricks described here iPhone Facebook Video Upload. As a result server returns an empty response and anything more happens afterwards. Video doesn’t appear on facebook. Have tried different types of facebook apps by the way, such as WebApp and Native one.
Second. Using “me/videos” GRAPH method and below code to initiate uploading
>
NSMutableDictionary *params = [NSMutableDictionary
dictionaryWithObjectsAndKeys:movieData,
@"source", @"File.mov", @"filename",
nil];
[m_facebook requestWithGraphPath:@"me/videos"andParams:params andHttpMethod:@”POST”
andDelegate:self];
In such a case I’m getting the next errors:
a) An active access token must be used to query information about the
current user.b) Video file format is not
supported.
Third. Simply send an email with video file attached to video@facebook.com. Doesn’t work. However this solution is not so interested as previous are.
I have spent 2 days figuring those things out and it makes me crazy. Could someone please share a working example of video uploading or at least point me out where I am wrong in my samples.
Thank you!
You should use the Graph method, since the old API is deprecated and will go away at some point in the fairly near future. Therefore, I’ll address that.
The first problem is that you can’t just upload a video to Facebook without being logged in somehow. You’ll need to follow these instructions to get an access token before you can upload videos: http://developers.facebook.com/docs/authentication
You’ll also need the
upload_videopermission, which for some reason isn’t listed on the “Permissions” page.I’m not sure about the second issue, but Facebook supports a number of video formats. Presumably your video is in one of the Apple formats, which are probably supported. Fix the first issue, and see if that has any effect on the second one.