【发布时间】:2011-10-14 03:08:19
【问题描述】:
我在我的 facebook iframe 应用程序中使用此嵌入代码:
<iframe width="420" height="315" src="http://www.youtube.com/embed/XXXXXX" frameborder="0" allowfullscreen></iframe>
但我在萤火虫控制台上收到此错误:
Unsafe JavaScript attempt to access frame with URL http://apps.facebook.com/xxxxxxxx/?state=f1f21e5736ae4e193f7234cae34842be&code=AQDKwOTwhCcU0DiWBuVO5igIudWEtypxt4xMNjDTN_dtK5ltdFb7e-2-EW1rWeIotL3v1RaanI390wWwkCLJH1dpFr76rCOZyKGCVCgBC40tUIaseY3FxLoXsoqLIRZ3X6zW3HgXr-YIY0dOSpPBKugxVKOT_28W-ejhQoFkbFg0iuTg-tonVJeCrRyXKg4yc9U#_=_ from frame with URL http://www.youtube.com/embed/XXXXXX. Domains, protocols and ports must match.
我在我的 html 标头上放置了 facebook 元标记:
<meta property="og:video" content="<?php echo $youtube_url;?>" />
<meta property="og:video:secure_url" content="<?php echo $youtube_url;?>" />
<meta property="og:video:height" content="640" />
<meta property="og:video:width" content="385" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
但我不断收到这些错误。
关于如何在 facebook iframe 中嵌入 youtube 视频的任何线索/建议?
【问题讨论】:
标签: javascript facebook facebook-graph-api youtube youtube-api