Objective c 谷歌+;签名不';我不能回到我的申请表上
我确实在谷歌网站上创建了一个控制台项目,并获得了客户端ID 我确实在我的应用程序中实现了signin按钮,它可以工作,但在登录后它不会返回到我的应用程序,而是转到google站点 这是我的密码:Objective c 谷歌+;签名不';我不能回到我的申请表上,objective-c,ios4,Objective C,Ios4,我确实在谷歌网站上创建了一个控制台项目,并获得了客户端ID 我确实在我的应用程序中实现了signin按钮,它可以工作,但在登录后它不会返回到我的应用程序,而是转到google站点 这是我的密码: signIn = [GPPSignIn sharedInstance]; signIn.clientID = kClientId; signIn.scopes = [NSArray arrayWithObjects: kGTLAuthSco
signIn = [GPPSignIn sharedInstance];
signIn.clientID = kClientId;
signIn.scopes = [NSArray arrayWithObjects:
kGTLAuthScopePlusLogin, // defined in GTLPlusConstants.h
nil];
signIn.delegate = self;
- (void)finishedWithAuth: (GTMOAuth2Authentication *)auth
error: (NSError *) error
{
NSLog(@"Received error %@ and auth object %@",error, auth);
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
// attempt to extract a token from the url
return [GPPURLHandler handleURL:url
sourceApplication:sourceApplication
annotation:annotation];
}
我看不出您调用了身份验证方法 在末尾添加方法调用,如下所示:
signIn = [GPPSignIn sharedInstance];
signIn.clientID = kClientId;
signIn.scopes = [NSArray arrayWithObjects:
kGTLAuthScopePlusLogin, // defined in GTLPlusConstants.h
nil];
signIn.delegate = self;
[signIn authenticate];
看看这个。