使用Facebook SDK分享视频

时间:2015-05-13 14:31:23

标签: ios objective-c facebook-sdk-4.0 facebook-graph-api-v2.0

我正在尝试使用array (size=2) 0 => array (size=3) 'file' => string 'fileThatIncudedMe.php' (length=63) 'line' => int 6 'function' => string 'require_once' (length=12) function whoIncludedThisFile() { $bt = debug_backtrace(); $includedMe = false; while (count($bt) > 0) { $set = array_shift($bt); if ( array_key_exists('function', $set) === true && in_array($set['function'], array('require', 'require_once', 'include', 'include_once')) ){ $includedMe = array('file'=>$set['file'], 'line'=>$set['line']); break; } } return $includedMe; } print_r(whoIncludedThisFile()); // Array ( [file] => topLevelFile.php [line] => 2 ) 分享YouTube视频,但它始终返回iOS

  

videoURL的值无效

这是我的代码

Facebook-SDK

1 个答案:

答案 0 :(得分:2)

分享youtube链接:

NSURL *videoURL =[NSURL URLWithString: @"https://youtu.be/i-QlMqZh8_g"];

FBSDKShareLinkContent *shareLinkContent = [[FBSDKShareLinkContent alloc] init];
shareLinkContent.contentURL = videoURL;

[FBSDKShareAPI shareWithContent:shareLinkContent delegate:self];