【发布时间】:2013-08-28 03:30:09
【问题描述】:
我正在开发一个 django 网站,该网站还允许用户使用他们的 Facebook 帐户登录。登录工作正常,但我无法使用 Internet Explorer 注销。该代码似乎在 Firefox 和 Chrome 上运行良好。
代码如下
function logoutFBUser()
{
//logout user from website and Facebook and reload
alert ("called FB logout");
if (FB.getAuthResponse())
{
alert ("has auth response");
FB.logout(function(response)
{
window.location.href = '/accounts/logout?next=/';
});
alert ("logged out of FB and redirected");
}
else
{
alert(" no auth response");
window.location.href = '/accounts/logout?next=/';
}
}
在 Firefox 中,我收到 has auth response 的警报,但在 IE 中,我收到 no auth response 的警报。如果我只使用FB.logout 而不使用FB.getAuthResponse,则函数在遇到FB.logout 时会挂起。
我错过了什么?
【问题讨论】:
-
您应该添加您正在使用的 IE 版本并考虑某种错误报告(您真的可以向 Facebook 报告错误吗?)。另外,这个 FB.getAuthResponse() 实际上是在向 Facebook 发送请求,对吧?所以它与 Django 和 Python(你已经标记它)无关。您同时遇到了 IE 和 Facebook 的问题 = 一些怪异的鸡尾酒。考虑根本不解决它。
-
我用的是IE 8。我需要解决它,因为我会有很多人在IE上使用它。有没有其他方法可以实现注销??
标签: django facebook internet-explorer facebook-javascript-sdk