简体   繁体   English

Facebook SDK V5撤销令牌问题

[英]Facebook sdk v5 revoke token issue

How to I revoke the access token? 如何撤销访问令牌? I unset and destroy the session, which works fine to remove the data, but when I log in again, I'd like to be able to log in with a different Facebook account (it automatically logs me in to the account I had previously logged in with). 我取消设置并销毁了该会话,可以很好地删除数据,但是当我再次登录时,我希望能够使用其他Facebook帐户登录(它会自动将我登录到以前登录的帐户在)。

I've read over the docs but clearly I am missing something. 我已经阅读了文档,但显然我遗漏了一些东西。 Can anyone help me out on this? 有人可以帮我吗?

You have 2 options: 您有2个选择:

  1. Log into to your Facebook account and in your settings find a list of authorized apps. 登录到您的Facebook帐户,然后在您的设置中找到授权应用程序的列表。 Then delete the app's access to your account. 然后删除该应用程序对您帐户的访问权限。 This should disable futher autologins. 这应该禁用进一步的自动登录。
  2. Do it through REST API. 通过REST API完成。 You need to send DELETE to PROFILE-ID/permissions as it is described in the docs . 您需要按照docs中的说明DELETE发送到PROFILE-ID/permissions

Note: You can also use me instead of your id : 注意:您也可以使用me代替您的id

# Revoke access of currently logged in user
DELETE /me/permissions

# Or if you want to revoke access for a specific user
DELETE /{user-id}/permissions

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

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