gpt4 book ai didi

ios - Facebook SDK是否区分iOS调试版本与发布版本

转载 作者:行者123 更新时间:2023-12-01 17:11:58 26 4
gpt4 key购买 nike

Facebook是否区分调试和发布iOS版本?在将新的版本提交到iTunes之前,我正在测试我的应用程序。我的应用使用在Facebook上发布照片的单一权限(即publish_actions)。奇怪的是,当我使用我的Facebook帐户进行测试时,一切正常。但是,当我使用伴侣的Facebook帐户进行测试时,它不会通过:开发人员帐户已链接到我的Facebook帐户;不是我伴侣的基本上针对以下方法

// Convenience method to perform some action that requires the "publish_actions" permissions.
- (void)performPublishAction:(void(^)(void))action {
// we defer request for permission to post to the moment of post, then we check for the permission
if ([FBSession.activeSession.permissions indexOfObject:@"publish_actions"] == NSNotFound) {
// if we don't already have the permission, then we request it now
NSLog(@"Requesting publish permission");
[FBSession.activeSession requestNewPublishPermissions:@[@"publish_actions"]
defaultAudience:FBSessionDefaultAudienceFriends
completionHandler:^(FBSession *session, NSError *error) {
NSLog(@"Completion handler returns for permission");
NSLog(@"My Permissions are: %@",session.permissions);
if (!error) {
NSLog(@"Okay no error");
action();
} else if (error.fberrorCategory != FBErrorCategoryUserCancelled) { NSLog(@"ERROR GETTING PERMISSION:: %@",error);
}
}];
} else {
NSLog(@"the other route");
action();
}

}

从未调用 action()

线
NSLog(@"My Permissions are: %@",session.permissions);

版画
My Permissions are: (
"public_profile"
)

和线
 NSLog(@"The ERROR IS: %@",error);

版画
The ERROR IS: Error Domain=com.facebook.sdk Code=2 
"The operation couldn’t be completed. com.facebook.sdk:ErrorReauthorizeFailedReasonUserCancelled" UserInfo=0x1702779c0
{com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:ErrorReauthorizeFailedReasonUserCancelled,
NSLocalizedFailureReason=com.facebook.sdk:ErrorReauthorizeFailedReasonUserCancelled,
com.facebook.sdk:ErrorSessionKey=<FBSession: 0x170169480, state: FBSessionStateOpen, loginHandler:
0x100374240, appID: 123456789, urlSchemeSuffix: ,
tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0x17022a740>, expirationDate: 2015-05-19 19:07:02 +0000,
refreshDate: 2015-03-20 19:07:02 +0000, attemptedRefreshDate: 0000-12-30 00:00:00 +0000, permissions:(
"public_profile"
)>}

最佳答案

Nopes Facebook不区分调试和发布iOS版本。但是,事实是,您并没有能够满足一般用户的心情。要使普通用户可以登录,您必须在已注册应用程序的https://developers.facebook.com/中无法使用您的应用程序

  • 首先转到https://developers.facebook.com/并使用您的开发者帐户
  • 登录
  • 单击我的应用程序,然后选择已注册的应用程序

  • 3.单击设置选项,然后在联系电子邮件选项中输入您的电子邮件并保存更改
    4,点击状态并查看并确认
  • 您将看到以下对话框,单击确认
  • 现在您将可以使用任何一个facebookt帐户
  • 登录

    关于ios - Facebook SDK是否区分iOS调试版本与发布版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29174565/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com