如何撤销使用Android SDK中的所有Facebook的权限? [英] How to revoke all Facebook permissions using Android SDK?
问题描述
我有一个问题,使用Android SDK撤销Facebook的权限。
I'm having a problem revoking Facebook permissions using the Android SDK.
有一个在我的应用程序的情况下,我想撤消所有权限。根据Facebook的文档,你可以使用AsyncFacebookRunner做到这一点,如果你不指定权限,那么这将完全取消授权的应用程序。
There's a case in my app where I want to revoke all permissions. According to the Facebook documentation, you can use AsyncFacebookRunner to do this, and "if you don't specify a permission then this will de-authorize the application completely."
目前,我正在做这样的:
I'm currently doing it like this:
String method = "DELETE";
Bundle params = new Bundle();
params.putString("permission", "");
mAsyncRunner.request("/me/permissions", params, method, new RequestListener()
{ ... }, null);
使用请求签名是这样的:
using the request signature like this:
void request(String graphPath, Bundle parameters, final String httpMethod,
RequestListener listener, final Object state)
本的onComplete()回调函数似乎又回来了OK,但似乎并没有取消授权的访问令牌。我推断这是因为下一次我打电话facebook.authorize(),它的工作原理没有推动用户的Facebook登录页面。
The onComplete() callback function seems to come back OK, but doesn't appear to have de-authorized the access token. I'm inferring this because the next time I call facebook.authorize(), it works without pushing the user to the Facebook login page.
我需要改变完全取消授权的访问令牌任何想法?还是有不同的/更好的方式来做到这一点?非常感谢!
Any ideas what I need to change to completely de-authorize an access token? Or is there a different/better way to do this? Many thanks!
推荐答案
这似乎从这个帖子:的Facebook取消对我的应用等人认为这是不可能以编程方式取消授权的应用程序。不幸的是,拨打以上成功返回来的onCreate(),但无助于deauth /删除用户的应用程序。
It appears from this post: Facebook deauthorize my app and others that it's not possible to deauthorize an application programmatically. Unfortunately, the call above returns successfully to onCreate() but does nothing to deauth/delete the app for the user.
底线:它看起来像只有这样,才能deauth的应用程序是用户在Facebook的直接做到这一点。如果有人知道不同的,请说出来 - 但除此之外,不要浪费你的时间尝试!谢谢。
Bottom line: It looks like the only way to deauth an app is for the user to do it directly in Facebook. If anyone knows differently, please say so - but otherwise, don't waste your time trying! Thanks.
这篇关于如何撤销使用Android SDK中的所有Facebook的权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!