Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploading video to Facebook using FB SDK on iOS, removes orientation. How do I fix it?

I can upload to facebook just fine using the facebook iOS SDK. However, a video shot in the app (our own app) in portrait orientation ends up in landscape on facebook.

ALAssetRepresentation *rep = [asset defaultRepresentation];      
Byte *buffer = (Byte*)malloc(rep.size);      
NSUInteger buffered = [rep getBytes:buffer fromOffset:0.0 length:rep.size error:nil]; 
NSData *data = [NSData dataWithBytesNoCopy:buffer length:buffered freeWhenDone:YES];

Above is the code that converts the video file to a NSData file that is included in the FB upload request. I imagine that's where i'm losing the orientation, but i can't find a solution. Any help out there?

Thanks,

Chris

like image 455
unimitated Avatar asked Feb 16 '12 15:02

unimitated


1 Answers

Refer the following Url

iphone ShareKit with Video upload for facebook?

like image 78
VSN Avatar answered Oct 04 '22 22:10

VSN