Upload videos to Facebook using the FB SDK on iOS, remove orientation. How to fix it?

I can upload to facebook just fine using the facebook iOS SDK. However, the video in the app (our own app) in portrait orientation ends in the 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 an NSData file, which is included in the FB download request. I assume that when I lose my orientation, but I cannot find a solution. Any help there?

Thanks,

Chris

+6
source share
1 answer
+1
source

Source: https://habr.com/ru/post/908626/


All Articles