iframe 中的 Facebook 连接 - 弹出窗口显示在 iframe 内

发布于 2024-08-01 13:46:25 字数 332 浏览 2 评论 0原文

我正在为一个网站实施 Facebook connect。 Facebook Connect 代码位于 iframe 内。 一切正常,但当 Facebook 应该显示弹出对话框时(例如 FB.Connect.showFeedDialogFB.Connect.streamPublish),弹出窗口会显示在 内iframe。 由于它是一个小的 iframe 窗口,因此弹出窗口是半隐藏的。

非常感谢任何有关如何解决该问题的想法。 注意:FB 登录和注销弹出窗口确实显示得很好。

I'm implementing Facebook connect for a website. The Facebook Connect code is inside an iframe. Everything works well but when Facebook is supposed to show a popup dialog (for example FB.Connect.showFeedDialog or FB.Connect.streamPublish) The popup shows inside the iframe.
Since its a small iframe window the popup is half hidden.

Any idea on how to solve it is very much appreciated.
Note: the FB login and logout popups do show well.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愛放△進行李 2024-08-08 13:46:25

我的窗口太小,无法正确显示 FB iframe,因此我重写了私有 _openFeedDialogIframe 函数来调用 _openFeedDialogWindow:

var init = function()
{
    FB.Connect.get_status().waitUntilReady(function(status)
    {
        FB.Connect._openFeedDialogIframe = function(b, a, f)
        {
            FB.Connect._openFeedDialogWindow(b, a, f);
        };
    });
};
FB.ensureInit(init);

这会在每次显示 iframe 时强制弹出窗口。

My window was too small to show the FB iframe properly, so I overrode the private _openFeedDialogIframe function to call the _openFeedDialogWindow:

var init = function()
{
    FB.Connect.get_status().waitUntilReady(function(status)
    {
        FB.Connect._openFeedDialogIframe = function(b, a, f)
        {
            FB.Connect._openFeedDialogWindow(b, a, f);
        };
    });
};
FB.ensureInit(init);

This forces a popup every time an iframe is to be shown.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文