views:

46

answers:

2

I'm currently building an application using the Adobe Facebook API and I've run into an issue where for the login method the Facebook login popup displays but when doing a Facebook share/post the popup is blocked.

This code works fine and displays me a Facebook login popup without question (Firefox):

var permissions:Array = ['publish_stream'];

Facebook.login( onFacebookLogin, { perms:permissions.join(',') } );

However, the following code running in the same application throws up a popup blocker (again Firefox):

Facebook.ui( "stream.publish", "popup", params );

Does anyone know of a work around this issue to make the share popup come up just like the login popup?

+1  A: 

Do you call the method as a result of an user action? For example click on a button? If not, that's the reason the pop-up blocker blocks it. If yes, there's an workaround by calling the JS function of the FB API to post on the wall from Flash. That's the way I ussually work with other flash developers. I create JS or PHP functions for various things within the FB API and they call them from Flash, using amfphp ( http://amfphp.sourceforge.net/ ) for PHP and calling Js directly.

Also, Chrome happens to block most pop-ups even if they're the result of clicking a button/link when you do it from Flash.

Claudiu
Hi. Thanks for that. Both actions are triggered by a button click. This also happens within Flash so I doubt the browser can distingues. I think the implementors of this library just made a mistake by opening a popup for the Facebook.ui call and a window for the Facebook.login.
Luke
There are problems in the Flash SDK, which isn't even coming from FB I think, so you might have to resort to a Javascript+Flash solution; which also doesn't solve your problem 100%, but still...
Claudiu
This SDK is coming from Adobe. I think it was originally a community project that Adobe seem to have taken ownership of. I think that's where it ended...
Luke
Very possible. What I know is that whenever I worked on FB projects with Flash developers they've been saying that the Flash SDK is making them problems and it's better not to use it and find a way through which I would provide them with the FB related functionality they need. Therefore, I would make Js and PHP functions taht they could use, as stated above.
Claudiu
Facebook with what ever API you use give problems... :)
Luke