views:

603

answers:

4

Hi guys, 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!

A: 

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:

echo "<fb:swf imgsrc=\"http://my.site.com/facebook-test/the_file_thumbnail.jpg\" swfsrc=\"http://my.site.com/facebook-test/the_file.swf\" width=\"760\" height=\"710\" />";
Addsy
I have tried that and it still doesn't want to display, what else could be wrong?
Hmmm, not sure then. Do you get anything at all? If you use firebug or one of the other inspectors, is there any html being generated at all? Have you used other fbml tags ok?
Addsy
I got it working, not sure exactly what it was, but if I pinpoint the problem I will post the exact solution here, thanx again!
+1  A: 

Host your flash in a web page on a server. Then use the iframe on canvas to pull in that page thus your Flash.

Bob
A: 

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.

daaku
A: 

any info on how to embed flash in iFrame canvas and access FB from inside the flash, which means I need the FB related variables to be passed to the flash through loaderInfo??

saiy2k