Facebook注销导致从我的应用程序注销 [英] Facebook Logout causes logout from my application

查看:210
本文介绍了Facebook注销导致从我的应用程序注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了简单的JavaScript小部件,使用Facebook单点登录进行登录。当他登录到Facebook时,它登录该人(经过授权第一次)。但是,当Facebook注销发生时,它也会注销用户。我想要这个人在退出Facebook时不会注销?

I have created simple javascript widget where login happens using Facebook Single Sign On. It logins the person whenever he is logged in to facebook (after authorization for the first time). However, it also logs out the user when Facebook logout happens. I want the person to not get logged out when the person logs out of Facebook?

建议我的方法是什么。

推荐答案

注销后不能保持Facebook连接。一个用户通过Facebook登录 - 将他们的信息存储在一个会话(cookie,表)中,然后依靠它们来创建自己的用户跟踪。

It is not possible to keep a facebook connection going once they are logged out. The way around would be to create your own user tracking.

只需要检查该用户是否仍然登录(您也需要实现自己的注销)。只有当您使用Facebook作为登录提供商时,这将会起作用,如果您需要与需要登录的facebook api进行交互,则必须先登录到Facebook。

Once a user is logged in through facebook - store their information in a session (cookie, table) and then rely only on that to check if this user is still logged in (you will need to implement your own logout too). This will work only if you use facebook as a login provider, if you need some interactions with facebook api that require login - they have to be logged in to facebook.

这篇关于Facebook注销导致从我的应用程序注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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