将 Flash 嵌入到 Facebook iframe 画布中
我想将 flash 文件嵌入到我的 facebook iframe 画布中,我正在使用 PHP sdk,这是我的代码,
echo "<fb:swf swfsrc=\"http://my.site.com/facebook-test/the_file.swf\" width=\"760\" height=\"710\" />";
我已经尝试了所有方法,但它似乎仍然不想显示。
提前致谢!
I would like to embed a flash file into my facebook iframe canvas, I am using the PHP sdk, here is my code,
echo "<fb:swf swfsrc=\"http://my.site.com/facebook-test/the_file.swf\" width=\"760\" height=\"710\" />";
I have tried everything but it still doesn't seem to want to display.
Thanx in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
将 Flash 托管在服务器上的网页中。然后使用画布上的 iframe 拉入该页面,从而拉入您的 Flash。
Host your flash in a web page on a server. Then use the iframe on canvas to pull in that page thus your Flash.
将 swf 嵌入 html 文件中,并让 iFrame 调用该 html 文件。对我来说就像魅力这里(正在建设中)。原文可以在此处找到。
Embed the swf in a html file and let the iFrame call for the html file. Worked like charm for me here (under construction). The original can be found here.
您还需要包含 imgsrc 属性。这是首先显示的缩略图,因为 facebook 要求用户在加载实际 swf 之前单击缩略图,
因此您需要类似以下内容:
You also need to include the imgsrc property. This is a thumbnail image that is displayed to begin with as facebook requires a user to click on the thumbnail before the actual swf is loaded
So you need something like:
对于 iframe Canvas 应用程序,您不需要使用
,而应该依赖 SWFObject 或类似内容来嵌入它,就像嵌入标准网页一样。With an iframe Canvas application, you shouldn't need to use
<fb:swf>
, and should instead rely on SWFObject or the like to embed it, as you would for a standard web page.这永远不会运行,因为你的应用程序是 iframe
此代码将只能在 FBML Canvas 上运行,不会在 IE 中运行,但会在 Firefox 中运行
如果你使用 html 渲染 flash,
this will never run because your application is iframe
this code will only run on FBML Canvas
any way if you use the html to render a flash will not run in IE but it will run with Firefox