FB.logout在IE8中不起作用 [英] FB.logout not working in IE8

查看:224
本文介绍了FB.logout在IE8中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Facebook登录与我的应用程序集成,当我退出我的应用程序时,我想从Facebook注销用户。所以我做了以下:

I've integrated facebook login with my application and I want to logout the user from facebook when he logs out of my application. So I did the following:

<a href="<c:url value='/security_logout'/>" onclick="FB.logout();">Logout</a>

这适用于Firefox和Chrome,但不适用于IE8。在IE8中,用户注销了应用程序,但没有从Facebook注销。
任何人遇到这种情况?

This works on Firefox and Chrome but doesn't work on IE8. In IE8 the user is logged out of the application but is not logged out of Facebook. Anyone else experiencing this?

推荐答案

我发现了完全相同的东西,还有Android浏览器。 Shahid的修复工作适用于我,然后我意识到另一种方法是将重定向放在回调函数中,如下所示:

I found the exact same thing and also with the Android browser. Shahid's fix worked for me and then I realized another approach would be to put the redirect within the callback function like this:

function mysignout(url)
{
    FB.logout(function()
    {
        top.location.href = 'url'
    });
}

如果你像我一样,你可能想到FB.logout只是毁灭了一个cookie或其他东西,但它似乎进行一些ajax调用(我想撤销服务器上的身份验证),具有不同的执行时间,特别是在使用无线网络的移动设备上。

If you're like me, you probably figured FB.logout is just destroying a cookie or something but it appears to make some ajax calls (I guess to revoke authentication on the server) and has different execution times, especially on mobile devices using wireless networks.

2000 ms可能不一定有足够的时间完成功能,否则可能不仅仅是必要。 FB.logout在每种情况下都完成,回调函数执行。

2000 ms might not necessarily be enough time for the function to complete, or it could be more than necessary. The callback function executes once FB.logout has completed in every case.

这篇关于FB.logout在IE8中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆