I wrote the following code to upload a video to facebook from an iOS device.
-(void)uploadVideo { NSLog(@"UPload Videio "); NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mov"]; NSLog(@"Path is %@", filePath); NSData *videoData = [NSData dataWithContentsOfFile:filePath]; NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: videoData, @"video.mov", @"video/quicktime", @"contentType", @"Video Test Title", @"title", @"Video Test Description", @"description", nil];
This gives me an error. The operation could not be completed. (com.facebook.sdk 5 error.)
I do not know what happened to facebook. It uploads an image, text, but in the video it gives this error.
NOTE:
- This is not due to sending again and again since I also tested by creating a new account and rebooting the iOS device.
- sample.mov also exists and works with the api chart, but the problem is with this SDK.
Thanks.
ios facebook
Veer suthar
source share