简体   繁体   English

如何强制facebook android 4.x sdk让用户重新输入其凭据?

[英]How to force the facebook android 4.x sdk to have the user re-enter their credentials?

There are many questions & answers related to the subject, but very few specific to Facebook's Android 4.x SDK. 与该主题相关的问题和答案很多,但针对Facebook的Android 4.x SDK的问题和答案很少。

What I want to do is, after I call LoginManager.getInstance().logOut(), I want the user to have to re-authenticate in order to create a new AccessToken. 我想做的是,在调用LoginManager.getInstance()。logOut()之后,我希望用户必须重新进行身份验证才能创建新的AccessToken。

I am seeing that after I call LoginManager.getInstance().logOut() I am not prompted for credentials the next time I call LoginManager.getInstance().logInWithReadPermissions(...). 我看到在我致电LoginManager.getInstance()。logOut()之后,下次我致电LoginManager.getInstance()。logInWithReadPermissions(...)时,系统未提示我输入凭据。

Anyone know how to force LoginManager to have the user re-authenticate? 有谁知道如何强制LoginManager来重新验证用户身份?

The Facebook process confused me for ages as it doesn't appear to be clearly explained, and as you point out, most of the questions are for SDK 3. Facebook的流程使我困惑了很多年,因为它似乎没有得到清楚的解释,并且正如您所指出的那样,大多数问题都针对SDK 3。

But as far as I can see the only way that the user needs to re-authenticate is if they go to 但据我所知,用户需要重新认证的唯一方法是

Facebook->Settings->Apps Facebook->设置->应用

and in App Settings click remove for the app. 然后在“应用设置”中,为该应用点击删除。

If they have approved the App for login once then no matter what happens with the App on the Android device, provided that you follow the correct usage of LoginManager, it never prompts the use to re-authenticate. 如果他们一次批准了该应用程序的登录权限,那么无论您在Android设备上使用该应用程序发生什么情况,只要您正确使用LoginManager即可,它绝不会提示您重新进行身份验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM