Facebook JS SDK for Open Graph:注销不工作! [英] Facebook JS SDK for Open Graph: Logout not working!

查看:162
本文介绍了Facebook JS SDK for Open Graph:注销不工作!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,当我调用 FB.logout(); 时,用户实际上并没有从Facebook注销。

For some reason when I call FB.logout();, the user does not actually get logged out of Facebook.

为什么会这样?没有js错误被抛出,我可以通过代码运行通过SDK ...它只是没有成功注销。

Why might this be? No js errors get thrown, and I can step through the code as it runs through the SDK... it just doesn't successfully log out.

推荐答案

您需要首先使用 fb-root DIV标签,然后调用 FB.init()然后 FB.logout()

You need to have the fb-root DIV tag first, then call FB.init() and then FB.logout()

示例用法:

FB.logout(function(){
  window.location = 'path/url here';
});

或者,您应该重定向到此url注销:

Alternatively, you should redirect to this url logout:

www.facebook.com/logout.php?app_key=KEY&session_key=SESSION&next=REDIRECT_URL

这篇关于Facebook JS SDK for Open Graph:注销不工作!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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