3

您好,我在我的网站上使用此代码来显示 facebook 视频:

<iframe src="https://www.facebook.com/video/embed?video_id=XX" width="640" height="480" frameborder="0"></iframe>

问题:它不适用于移动设备(它需要不可能的快速付款安装)

它尝试使用 facebook 工具在网站上集成视频帖子: http

: //nsa34.casimages.com/img/2013/10/17/131017070157521369.png 示例:

<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/fr_FR/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-post" data-href="https://www.facebook.com/photo.php?v=589822344439680" data-width="550"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/photo.php?v=589822344439680">Publication</a> de <a href="https://www.facebook.com/AmazingCrazyVideos">Amazing and Crazy videos</a>.</div></div>

这个效果很好,但它不仅显示视频..我只需要视频

我试过这个:

<object width="400" height="224" > 
 <param name="allowfullscreen" value="true" /> 
 <param name="allowscriptaccess" value="always" /> 
 <param name="movie" value="http://www.facebook.com/v/xxx" /> 
 <embed src="http://www.facebook.com/v/xxx" type="application/x-shockwave-flash"  
   allowscriptaccess="always" allowfullscreen="true" width="400" height="224"> 
 </embed> 
</object> 

这没用。

4

3 回答 3

1

this is the code I use... you only change the video video_id=628132747223650 and he Heigth and width and thats it

  1. This is normal text.
  2. So is this, but now follows a code block:

    <iframe src="http://www.facebook.com/video/embed?video_id=628132747223650" height="320" width="540" frameborder="0"></iframe>
    
于 2014-08-19T15:20:11.760 回答
0

如果您希望视频在 div 中正确调整大小,只需将宽度设置为 100%。例子:

<iframe src="http://www.facebook.com/video/embed?video_id=785565964819891" width="100%" frameborder="0"></iframe>

于 2014-09-19T18:27:55.337 回答
0

尝试增加 iframe 的 z-index 它对我有用。

于 2020-03-28T13:13:59.613 回答