[英]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. 我可以使用facebook iOS SDK上传到Facebook。 However, a video shot in the app (our own app) in portrait orientation ends up in landscape on facebook.
然而,在应用程序(我们自己的应用程序)中纵向拍摄的视频最终会在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. 以上是将视频文件转换为FB上载请求中包含的NSData文件的代码。 I imagine that's where i'm losing the orientation, but i can't find a solution.
我想这就是我失去方向的地方,但我找不到解决方案。 Any help out there?
有帮助吗?
Thanks, 谢谢,
Chris 克里斯
Refer the following Url 请参阅以下网址
iphone ShareKit with Video upload for facebook? 用于Facebook的iphone ShareKit和视频上传?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.