簡體   English   中英

Facebook視頻共享IOS目標C出錯

[英]Error on Facebook Video Sharing IOS Objective C

我正在嘗試在Facebook上分享視頻,我正在使用fbsdk新版本4.1.0我也遵循了developer.facebook.com中給出的說明

  • 視頻的大小必須小於12MB。
  • 分享的人應安裝Facebook for iOS客戶端,版本26.0或更高版本。

我使用以下代碼在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];

但我得到的問題是,

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}

謝謝

使用UIImagePickerControllerReferenceURL而不是UIImagePickerControllerMediaURL。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM