I have problem in a script that was working until 3 or 4 days ago.
I'm using this (simplified version) code to send an app request to a user and it was working until few days ago, now it seems that something in facebook has changed and the window (wich is opened in iframe automatically) loads forever in Firefox and Internet Explorer. It continues to work normaly.
I Know that I can force the parameter display: 'popup', but sending the request after some other javascript lines it means that firefox blocks the popup opening and so it is useless for me.
function Test()
{
FB.ui({method: 'apprequests', message: 'My Great Request' }, CallbackFunction);
}
function CallbackFunction(response)
{
alert(JSON.stringify(response));
}
The page has no style and it's clean, here the full code: http://pastebin.com/QqbRceJ2
This is what it happens: http://i59.tinypic.com/10hq6w5.png
Any help is apreciated, I'm stuck on this since monday...
As Slav said it's a confirmed Facebook SDK bug that's related to iframe:
It appears this issue is occurring when you provide the
display:"iframe" parameter to the feed dialog. If that is removed the
dialog should be displayed correctly as a temp fix while this is
investigated .
Although you're not passing the display=iframe
parameter, the default behavior of the FB.ui
is a modal iframe:
The display parameter: determines how the dialog is rendered. If you are using the URL
redirect dialog implementation, then this will be a full page display,
shown within Facebook.com. This display type is called page. If you
are using one of our iOS or Android SDKs to invoke the dialog, this is
automatically specified and chooses an appropriate display type for
the device. If you are using the JavaScript SDK, this will default to
a modal iframe type for people logged into your app or async when
using within a game on Facebook.com, and a popup window for everyone
else. You can also force the popup or page types when using the
JavaScript SDK, if necessary. Mobile web apps will always default to
the touch display type.
Try changing your function Test()
to this:
function Test(){
FB.ui({display: 'popup', method: 'apprequests', message: 'My Great Request' }, CallbackFunction);
}
I guess the correct answer is that is is FB SDK bug as confirmed here
https://developers.facebook.com/x/bugs/733458870047972/