Method FB.ui loads forever when called on Firefox and Internet Explorer

霸气de小男生 提交于 2019-11-30 05:25:21
Fabio Antunes

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/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!