如何嵌入 Facebook 视频?

ipe*_*sus 2 html facebook facebook-graph-api

我想知道如何嵌入 Facebook 视频?

我按照以下说明操作:

https://developers.facebook.com/docs/plugins/embedded-video-player

但它不起作用。这是源代码:

<html>
  <head>
    <title>My Website</title>
  </head>
  <body>
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <h1>My Video Player</h1>
    <div class="fb-video"
    data-href="https://www.facebook.com/FacebookDevelopers/posts/10151471074398553"
    data-width="500"
    data-allowfullscreen="true"></div>
  </body>
</html>
Run Code Online (Sandbox Code Playgroud)

提前致谢

Dom*_*une 7

我知道这是一个旧帖子。但这个代码就是答案。欲了解更多信息,请看这里。

<!-- replace {facebook-video-url} with the correct url-->
<iframe 
  src="https://www.facebook.com/plugins/video.php?href={facebook-video-url}&show_text=0&width=560"
  width="560" height="315" 
  style="border:none;overflow:hidden" 
  scrolling="no" frameborder="0" allowTransparency="true" allowFullScreen="true"
></iframe>
<!--example given-->
<iframe 
  src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FPlayStation%2Fvideos%2F10155554431506803%2F&show_text=0&width=560"
  width="560" height="315" 
  style="border:none;overflow:hidden" 
  scrolling="no" frameborder="0" allowTransparency="true" allowFullScreen="true"
></iframe>
Run Code Online (Sandbox Code Playgroud)