[英]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.