开发者

How to successfully embed a youtube video on facebook application tab

I have created simple facebook app. I have a profile tab(for facebook pages) where I have embed a youtube video.

<fb:swf swfbgcolor="000000" imgstyle="border-width:3px; border-color:white;" swfsrc='http://www.youtube.com/v/xxxxxxxxxx'  imgsrc='http://i开发者_如何学编程mg.youtube.com/vi/xxxxxxxxxx/2.jpg' width='340' height='270' />

The image appears fine. But onclick It does not play the video.

I appreciate any help.

Thanks.


in order to achieve that you have to correctly replace the swfsrc attribute value with the one of the youtube video you want.

open the youtube video link, click on the embed button and look at the first <param name="movie" value="http://www.youtube.com/v/cNgf6fd88g8?fs=1&amp;hl=en_US"></param> tag. copy that value (without the query string) and paste it on your swfsrc attribute value. that's all. enjoy ;)


<iframe 
    id="yt" 
    src="//www.youtube.com/embed/i8h9_2Ph5VY/?wmode=opaque&amp;version=3&amp;theme=dark&amp;width=810&amp;height=456&amp;autoplay=0&amp;rel=0&amp;showinfo=0&amp;iv_load_policy=3&amp;&amp;vq=hd720&amp;hd=1&amp;html5=1&amp;enablejsapi=1&amp;playerapiid=main" 
    frameborder="0" 
    scrolling="no" 
    allowfullscreen="true" 
    webkitallowfullscreen="true" 
    mozallowfullscreen="true" 
    style="width: 810px; height: 456px;">
</iframe>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜