I have an application that publishes native files (MOV files) to Facebook using the iOS SDK for Facebook. It worked without problems until a few weeks ago when it started failing with the following error:
error = { code = 352; message = "(#352) Sorry, the video file you selected is in a format that we don't support."; type = OAuthException; };
Full error line:
Domain error = com.facebook.sdk Code = 5 "Operation could not be performed. (Com.facebook.sdk error 5.)" UserInfo = 0x1ea42880 {com.facebook.sdk: HTTPStatusCode = 400, com.facebook. SDK: ParsedJSONResponseKey = {body = {error = {code = 352; message = "(# 352) Sorry, the video file you selected is in a format that we do not support."; type = OAuthException; }; }; code = 400; headers = ({name = "Access-Control-Allow-Origin"; value = "*";}, {name = "Cache-Control"; value = "no-store";}, {name = Connection; value = close;}, {name = "Content-Type"; value = "text / javascript; charset = UTF-8";}, {name = Expires; value = "Sat, 01 Jan 2000 00:00:00 GMT"; }, {name = Pragma; value = "no-cache";}, {name = "WWW-Authenticate"; value = "OAuth \" Facebook Platform \ "\" invalid_request \ "\" (# 352) Unfortunately, The video file you selected is in a format that we donโt support. \ ";}, {name =" x-fb-loadmon "; value =" 0.30.70 "; });}, com.facebook.sdk: ErrorSessionKey =, expirationDate: 4001-01-01 00:00:00 +0000, refreshDate: 2013-10-15 17:19:33 +0000, attemptRefreshDate: 2013-10- 24 14: 56:54 +0000, permissions :( "Share_item", Email address, "user_photos", "user_videos", "publish_checkins", "manage_pages", "read_friendlists")>}
The code I use for publishing is similar to this:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: videoData,@"video.mov", @"video/quicktime", @"contentType", title, @"title", status, @"description", nil]; FBRequest* request = [FBRequest requestWithGraphPath:[NSString stringWithFormat:@"%@/videos",@"me"] parameters:params HTTPMethod:@"POST"]; [request setSession:session]; dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0ul); dispatch_async(queue, ^{ dispatch_async(dispatch_get_main_queue(), ^(void) { [request startWithCompletionHandler:^(FBRequestConnection* conn, id data, NSError* error){ SSLog(@"DONE!"); [self processResponseWithData:data requestIdentifier:requestIdentifier andError:error]; }]; }); });
I updated the latest SDK (3.9), but the error still exists. Does any body have this error?
I am testing iOS6 and iOS7, so the problem is not related to the OS version. The same video is uploaded by okey using the built-in iOS-Facebook feature.
Many thanks!