I am using Graph API to upload video on facebook. I am able to upload .wmv format video but not .mp4. My code is as below
strVidUrl=@"http://myshow.com.au/Videos/mp4s/20111216044530271247467.mp4";
//strVidUrl=@"http://www.myshow.com.au/Videos/BossAlarm.wmv";
NSURL *url = [NSURL URLWithString:strVidUrl];
NSData *data = [NSData dataWithContentsOfURL:url];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
data, @"video.mov",
@"video/mp4", @"contentType",
[dicVideoDetails valueForKey:@"fld_display_name"], @"title",
[dicVideoDetails valueForKey:@"fld_video_description"], @"description",
nil];
if I use .wmv then code is below and it is running.
NSURL *url = [NSURL URLWithString:@"http://www.myshow.com.au/Videos/BossAlarm.wmv"];
NSData *data = [NSData dataWithContentsOfURL:url];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
data, @"video.mov",
@"video/quicktime", @"contentType",
@"Video Test Title", @"title",
@"Video Test Description", @"description",
nil];
Result is comming same in both cases but .mp4 video is not showing on facebook. while .wmv is showing there.
Please help me.
That may be due to the missmatch of codecs and compression rates of your source video and fb’s recomented video format