bertrando / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

Facebook Desktop (AIR) to Facebook Embed (iFrame)... not works! #209

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
  I'm using FacebookDesktop library with AIR to design my application. But now I need the same application running in Facebook, using Flash. The code:

FacebookDesktop.init("app_id",handleLogin);
FacebookDesktop.login(handleLogin, ["publish_stream"]);

  When I run this, the AIR open a Facebook login dialog. After authentication, handleLogin function is called. To Facebook embed, I try the code below, but not works:

Facebook.init("app_id",handleLogin);
Facebook.login(handleLogin, ["publish_stream"]);

  How can I embed a .swf in Facebook? I need to pass access_token from javascript, php, etc... to swf? How I do this?

Tks,
Rafael

Original issue reported on code.google.com by rafa...@gmail.com on 9 Nov 2010 at 4:23

GoogleCodeExporter commented 9 years ago
First, you need to change the 2nd parameter passed into Facebook.login.
It should be an object like: {perms:'read_stream,publish_stream,offline_access'}
instead of an array that is passed into FacebookDesktop.

There is also a known bug in FacebookDesktop where the login callback is not 
handled properly. It is fixed in my branch: 
http://code.google.com/p/facebook-actionscript-api/issues/detail?id=176

There are 3 things that you need to add to the html to get Facebook to 
communicate properly with your swf:

1) Include the Facebook JavaScript in the head.

2) Include the Facebook root div in the body.

3) Make sure that your swf is embedded with an id and name attribute so the 
JavaScript can properly reference it.

Original comment by yourpalm...@gmail.com on 12 Nov 2010 at 3:24

GoogleCodeExporter commented 9 years ago
Thanks a lot man! I lost much time with this. Now its working fine!!!!!

[]'s
Rafael

Original comment by rafa...@gmail.com on 16 Nov 2010 at 12:19

GoogleCodeExporter commented 9 years ago
Hi yourpalmark! Can you upload a compiled (swc) Facebook Desktop api, please? I 
need the kill session on logout bug fix and I didn't get api compiled.

tks!

Original comment by rafa...@gmail.com on 16 Nov 2010 at 10:00

GoogleCodeExporter commented 9 years ago

Original comment by edwar...@gmail.com on 12 Jan 2011 at 11:01