简体   繁体   English

FBSDKShareDialog共享对话框未打开以进行视频共享

[英]FBSDKShareDialog share dialog not open for video sharing

I am using Facebook Sdk 4.1, https://developers.facebook.com/docs/sharing/ios#Advanced share_dialog I am using FBSDKShareDialog to share Video .It does share Video if user has installed facebook app," Idk whats wrong plz help me in sharing Video using FBSDK 4.1. 我正在使用Facebook Sdk 4.1, https: //developers.facebook.com/docs/sharing/ios#Advanced share_dialog我正在使用FBSDKShareDialog共享视频。如果用户已安装了Facebook应用程序,它的确共享视频。我使用FBSDK 4.1共享视频。

NSURL *movieUrl = [info objectForKey:UIImagePickerControllerMediaURL];
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc]init];
NSURL *videoURL=movieUrl;
FBSDKShareVideo *video = [[FBSDKShareVideo alloc] init];
video.videoURL = videoURL;
FBSDKShareVideoContent *content = [[FBSDKShareVideoContent alloc] init];
content.video = video;

shareDialog.shareContent = content;
shareDialog.delegate=self;
[shareDialog show];

i am getting response for console 我正在收到控制台的响应

error:Error Domain=com.facebook.sdk.share Code=2 "The operation couldn't be completed. (com.facebook.sdk.share error 2.)" UserInfo=0x19784210 {com.facebook.sdk:FBSDKErrorArgumentValueKey=, com.facebook.sdk:FBSDKErrorArgumentNameKey=shareContent, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Share content must be FBSDKShareLinkContent or FBSDKSharePhotoContent in order to share with the share sheet.} 错误:错误Domain = com.facebook.sdk.share代码= 2“操作无法完成。(com.facebook.sdk.share错误2。)” UserInfo = 0x19784210 {com.facebook.sdk:FBSDKErrorArgumentValueKey =, com.facebook.sdk:FBSDKErrorArgumentNameKey = shareContent,com.facebook.sdk:FBSDKErrorDeveloperMessageKey =共享内容必须为FBSDKShareLinkContent或FBSDKSharePhotoContent才能与共享表共享。}

How can somebody share file system URL in Facebook, you must provide a valid video URL for Example :- www.xyz.org/bunny.mp4 有人如何在Facebook中共享文件系统URL,您必须提供有效的视频URL,例如: www.xyz.org/bunny.mp4


Just make your facts right, " UIImagePickerControllerMediaURL - Specifies the filesystem URL for the video." 正确地说,“ UIImagePickerControllerMediaURL指定视频的文件系统URL。”

Please check: 1)The videos must be less than 12MB in size. 请检查:1)视频大小必须小于12MB。 2)People who share should have Facebook for iOS client installed, version 26.0 or higher. 2)共享的人应安装26.0或更高版本的iOS客户端Facebook。

You should use the below line: 您应该使用以下行:

NSURL *movieUrl = [info objectForKey:UIImagePickerControllerReferenceURL];

instead of 代替

NSURL *movieUrl = [info objectForKey:UIImagePickerControllerMediaURL];

This works with facebook app in device. 这适用于设备中的Facebook应用。

In may case i was having this error because i was testing in the simulator without facebook app. 在可能的情况下,我遇到此错误是因为我在没有Facebook应用的模拟器中进行测试。

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

相关问题 FBSDKShareDialog 在视频共享的情况下不出现 - FBSDKShareDialog not appearing in case of video share 如何使用Facebook iOS SDK 4.0 FBSDKShareDialog分享NSData或phasset视频 - How to share NSData or phasset video using Facebook iOS SDK 4.0 FBSDKShareDialog 如何知道Facebook共享是否使用FBSDKShareDialog完成 - How to know if facebook sharing is completed using FBSDKShareDialog FBSDKShareDialog中的iOS我们可以在没有内容的情况下共享 - iOS in FBSDKShareDialog can we share without content 在应用程序内共享fb图像和消息内容无法使用FBSDKShareDialog - Sharing fb image and message content within the app not working using FBSDKShareDialog Facebook iOS SDK“共享”对话框-在朋友的墙上共享 - Facebook iOS SDK Share Dialog - Sharing on a Friend's Wall 在没有安装Facebook App的情况下,FBSDKShareDialog不会共享照片 - FBSDKShareDialog doesn't share Photo without Facebook App installed, IOS iOS:FBSDKShareDialog打开应用程序,但不允许用户共享链接 - iOS: FBSDKShareDialog Opening App but Not Allowing User to Share Link 与FBSDK共享视频时如何显示对话框? - How do you show a dialog when sharing a video with the FBSDK? 有什么办法可以从网页打开android / ios本机共享对话框 - Is there any way to open the android/ios native share dialog from a webpage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM