我正在使用此代码登录 Google Plus 以访问我的应用。
- (IBAction)GplusAction:(id)sender {
// Make sure the GPPSignInButton class is linked in because references from
// xib file doesn't count.
[GPPSignInButton class];
GPPSignIn *signIn = [GPPSignIn sharedInstance];
signIn.shouldFetchGooglePlusUser = YES;
signIn.shouldFetchGoogleUserEmail = YES;
signIn.delegate = self;
}
- (void)finishedWithAuth:(GTMOAuth2Authentication *)auth
error:(NSError *)error
{
if (error) {
NSLog(@"error");
return;
}
}
它不会重定向到任何页面。你能帮我解决我的问题吗?如果在 iOS 中有任何简单的 Google Plus 登录,请引用链接。
提前致谢。
最佳答案
最后我通过使用 OAuth 2.0 协议(protocol)
找到了解决方案。
引用
:http://technogerms.com/login-with-google-using-oauth-2-0-for-ios-xcode-objective-c/
源代码
:https://github.com/emysa341/Login-with-gmail-google-g--using-oath-2.0-protocol
关于ios - Google plus 登录在 iOS 应用程序中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20901704/