简体   繁体   English

FB.ui对话框的请求在iframe模式下永久挂起

[英]FB.ui dialog for apprequest hangs forever in iframe mode

Somehow I can't get the iframe mode to work in the following code The dialog shows up but the loading hangs forever and nothing is displayed in the box it works just fine with display: popup 不知何故,我无法在以下代码中使用iframe模式该对话框出现,但是加载永久挂起,并且框中没有显示任何内容,它在显示时可以正常使用:popup

    FB.getLoginStatus(function(resp) {

      if (resp.status !== 'connected') return;
      FB.ui({
        method: 'apprequests',
        title: 'My title',
        display: 'iframe',
        message: 'My message',
        to: '100003750613973'
      }, function(resp) {
        console.log('emitted request to ', resp.to);
      });
    });

Myself and some of my peers are seeing the same behavior. 我自己和我的一些同伴正在看到相同的行为。 In our case, the problem seems to happen only when running on a port other than 80. Eg in development, we usually run on port 3000, and see the hang you describe (with the "feed" dialog in our case). 在我们的情况下,问题似乎仅在80以外的端口上运行时才会发生。例如,在开发中,我们通常在3000端口上运行,并看到您所描述的挂起(在本例中为“ feed”对话框)。 When running on port 80, everything works fine. 在端口80上运行时,一切正常。 This appears to be a recent problem. 这似乎是最近的问题。

Haven't used FB.ui in quite a while so not sure how it changed meanwhile, but why do you return console.log()? 已有相当一段时间没有使用FB.ui了,所以不确定它如何更改,但是为什么要返回console.log()? I'd say, remove the return keyword and try again. 我会说,删除return关键字,然后重试。 See what the Firbug / Chrome / etc. console says. 查看Firbug / Chrome / etc。控制台的内容。 Based on that I'm sure you'll be able to get to a working solution, or post it here and we can help you out. 基于此,我确信您将能够找到可行的解决方案,或在此处发布它,我们将为您提供帮助。 Code should be quite standard. 代码应该很标准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM