我正在尝试使用Facebook-SDK
在iOS
中共享YouTube视频,但它总是返回error code 2
视频的无效价值
这是我的代码
NSURL *videoURL =[NSURL URLWithString: @"https://youtu.be/i-QlMqZh8_g"];
FBSDKShareVideoContent *content =[[FBSDKShareVideoContent alloc]init];
content.video= [FBSDKShareVideo videoWithVideoURL:videoURL];
[FBSDKShareAPI shareWithContent:content delegate:self];
共享youtube链接:
NSURL *videoURL =[NSURL URLWithString: @"https://youtu.be/i-QlMqZh8_g"];
FBSDKShareLinkContent *shareLinkContent = [[FBSDKShareLinkContent alloc] init];
shareLinkContent.contentURL = videoURL;
[FBSDKShareAPI shareWithContent:shareLinkContent delegate:self];