iOS中的Google Plus登录错误

时间:2014-06-16 06:24:18

标签: ios google-plus

我正在尝试从G +登录但收到错误: -

  

收到错误错误域名= com.google.GTLJSONRPCErrorDomain代码= 403“无法完成操作。(管理员已停用对Google+ API的访问权限。)”UserInfo = 0x178073300 {error =访问Google+管理员已禁用API。,NSLocalizedFailureReason =(管理员已禁用对Google+ API的访问权限。),GTLStructuredError = GTLErrorObject 0x170242880:{message:“管理员已停用对Google+ API的访问权限。”数据:[1]的代码:403}}和AUTH对象== GTMOAuth2Authentication 0x170107b30:{的accessToken = “ya29.LgDbgzeDHH-EHB4AAACiojQ6u1x8sXKDsmePvgb0QOU9KR0PDulOJButDRlW0Q”,refreshToken = “1 / -kmXRNhMIY5OlcJqxTHn5wcv-QZ03OWpDtg5uhIocSc”,代码= “4 / IaJxQlNIHJKH8Lm4BE8EcqNNoVIV.4kT6JVDlY68QgrKXntQAax14lapGjQI”, expirationDate =“2014-06-16 07:18:18 +0000”}

signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGooglePlusUser = YES;
signIn.shouldFetchGoogleUserEmail = YES;  // Uncomment to get the user's email

// You previously set kClientId in the "Initialize the Google+ client" step
signIn.clientID = KGoogleClientID;

// Uncomment one of these two statements for the scope you chose in the previous step
signIn.scopes =  [NSArray arrayWithObjects: @"https://www.googleapis.com/auth/plus.login", nil ];

// Optional: declare signIn.actions, see "app activities"
signIn.delegate = self;
[signIn authenticate];

然后调用delegate:

- (void)finishedWithAuth: (GTMOAuth2Authentication *)auth
               error: (NSError *) error {
    NSLog(@"Received Error %@  and auth object==%@",error,auth);
}

我的客户ID是正确的。

在App代表中:

-(BOOL)application:(UIApplication *)application  openURL:(NSURL *)url sourceApplication:
    NSString *)sourceApplication annotation:(id)annotation
{
    return [GPPURLHandler handleURL:url
        sourceApplication:sourceApplication
        annotation:annotation];
}

1 个答案:

答案 0 :(得分:2)

您必须使用其他电子邮件/密码登录。您的邮件服务器出了问题。这是在我的代码中工作