1

I'm trying to embed the SWF file to the wall post but it works with Youtube URL but not for my own URL. When it doesn't work it will not even show the picture in the post. See below for the code.

This one is work:

$result = $facebook->api('/' . $postTo . '/feed' , 'post' , array(
            "name" => APP_NAME,
            "message" => mysql_real_escape_string($title2),
            "picture" => "http://www.mydomain.com/pinklogo.jpg", 
            "link" => fb_root(),
            "caption" => $title,
            "description" => $des,
            "source" => 'http://www.youtube.com/v/qAsx_PkkMu8'
        ));

This one is not work:

$result = $facebook->api('/' . $postTo . '/feed' , 'post' , array(
            "name" => APP_NAME,
            "message" => mysql_real_escape_string($title2),
            "picture" => "http://www.mydomain.com/pinklogo.jpg", 
            "link" => fb_root(),
            "caption" => $title,
            "description" => $des,
            "source" => 'http://www.mydomain.com/qAsx_PkkMu8.swf'
        ));

Is there any approval request that I need to do before Facebook allow to publish SWF from my domain?

Thanks.

Kara
  • 6,115
  • 16
  • 50
  • 57
Earguay
  • 58
  • 5
  • It's solved. It was my fault that my SWF is not work properly. So, no issue with Facebook Graph API. – Earguay Jun 13 '12 at 11:35

1 Answers1

0

Are you getting a security exception thrown? You may need a cross domain policy file that grants cross domain script access. The swf is hosted on a page on facebook.com, but is trying to load resources from mydomain.com. Flash player will block it unless your domain has specifically allowed it.

This person had a similar problem. This question has a lot of examples of what your file could look like.

Please be aware that if you put a liberal cross domain policy file on your server (like allowing '*') you could make users of your website more vulnerable to cross site scripting attacks.

For what and why from Adobe see here, here and here.

Community
  • 1
  • 1
poida
  • 3,403
  • 26
  • 26
  • Hi Poida - Thanks for the reply but this is not the Flash issues. Because if I post the link directly with http://www.mydomain.com/qAsx_PkkMu8.swf. It will work well. I'm not sure why the "source" parameter is not work for my domain. – Earguay Jun 11 '12 at 16:27
  • @ChoopongChoosamer did it turn out to be a security exception after all? – poida Jun 13 '12 at 11:50