简体   繁体   English

使用iOS上的FB SDK将视频上传到Facebook,删除方向。我如何解决它?

[英]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 克里斯

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决iOS中的视频定位问题 - How to fix video orientation issue in iOS 我正在使用facebook ios sdk 3.0登录到我的应用程序fb登录正常工作,但未连接到该应用程序吗? - I am using facebook ios sdk 3.0 for logging into my app fb login working but not connecting to the app? 如何在iOS的Facebook SDK上发布大型视频? - how can I post large video on facebook sdk in iOS? 如何允许用户使用iOS版Facebook SDK来“赞”我们的Facebook公司资料? - How do I allow users to “Like” our Facebook company profile using the Facebook SDK for iOS? 即使在横向方向,UINavigationController.view.frame也会返回纵向CGRect。 如何解决这个问题? - UINavigationController.view.frame returns portrait CGRect even in landscape orientation. How to fix this? 如何使用 FB SDK 3.1 和 iOS&lt;6 预览 facebook 状态更新? - How to preview facebook status update with FB SDK 3.1 and iOS<6? 当我在FB桌面上看到消息时,FB messenger如何从iOS应用程序中删除推送通知? - How does FB messenger removes push notification from iOS app when I see the message on FB Desktop? 使用Facebook iOS SDK 2,我如何喜欢一个页面? - “申请必须在白名单上” - using Facebook iOS SDK 2, how do I like a page? - “Application must be on whitelist” 如何在 iOS 上使用 Phonegap 正确检测方向变化? - How do I correctly detect orientation change using Phonegap on iOS? 使用iOS SDK在Facebook上分享视频 - Share video on facebook with iOS SDK
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM