发布或管理权限不允许被读取权限FACEBOOK SDK请求 [英] Publish or manage permissions are not permited to to be requested with read permissions FACEBOOK SDK
问题描述
我目前正在尝试实施Facebook登录和注册流程到我们的应用程序。
但是有一点问题。我已经获得了我们的Web-Api的权限,如果我尝试将它们传递给 openActiveSessionWithReadPermissions
Facebook SDK的方法发生以下消息的错误:
I am currently trying to implement Facebook Login and Registration Flow to our Application.
But there is a little Problem. I've got the permissions from our Web-Api and if i try to pass them to the openActiveSessionWithReadPermissions
Method of the Facebook SDK an error with the following message occurs :
> Terminating app due to uncaught exception
> 'com.facebook.sdk:InvalidOperationException', reason: 'FBSession:
> Publish or manage permissions are not permited to to be requested with
> read permissions.
所以似乎我无法通过这种方法发布或管理权限。
我现在的问题是:为什么我不能将此参数传递给openActiveSession,我该怎么办?
So it seems that i cant pass publish or manage permissions with this method. My question now is : Why can i not pass this parameter to the openActiveSession and how should i do this ?
推荐答案
如果您要打开一个活动的会话,而不是 ReadPermissions
,您可以尝试
If you want to open an active session with permissions other than ReadPermissions
, you can try
openActiveSessionWithPublishPermissions:(NSArray *)permissions
defaultAudience:(FBSessionDefaultAudience)
allowLoginUI:(BOOL)allowLoginUI
completionHandler:^(FBSession *session, FBSessionState status, NSError *error)handler
方法。或者如果要重新授权已经打开的会话与其他权限,您可以使用
method. Or if you want to reauthorize an already open session with other permissions , you can use
- (void)reauthorizeWithReadPermissions:(NSArray*)readPermissions
completionHandler:(FBSessionReauthorizeResultHandler)handler;
或
- (void)reauthorizeWithPublishPermissions:(NSArray*)writePermissions
defaultAudience:(FBSessionDefaultAudience)defaultAudience
completionHandler:(FBSessionReauthorizeResultHandler)handler;
方法。尝试通过FBSession.h类。
Methods. Try going through FBSession.h class.
这篇关于发布或管理权限不允许被读取权限FACEBOOK SDK请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!