Pra*_*n B 5 facebook objective-c facebook-graph-api ios
我正在尝试在Facebook上分享视频,我正在使用fbsdk新版本4.1.0,我也遵循了developer.facebook.com中的指示
我已使用以下代码在Facebook中共享视频
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc]init];
NSURL *videoURL=[info objectForKey:UIImagePickerControllerMediaURL];
FBSDKShareVideo *video = [[FBSDKShareVideo alloc] init];
video.videoURL = videoURL;
FBSDKShareVideoContent *content = [[FBSDKShareVideoContent alloc] init];
content.video = video;
shareDialog.shareContent = content;
shareDialog.delegate=self;
[shareDialog show];
Run Code Online (Sandbox Code Playgroud)
但问题是,
Error Domain=com.facebook.sdk.share Code=2 "The operation couldn’t be completed. (com.facebook.sdk.share error 2.)" UserInfo=0x174479f40 {com.facebook.sdk:FBSDKErrorArgumentValueKey=<FBSDKShareVideoContent: 0x174475040>, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Only asset file URLs are allowed for the native dialog., com.facebook.sdk:FBSDKErrorArgumentNameKey=videoURL}
谢谢