Google+的登入不回我的应用程序

问题描述:

我没有在谷歌网站创建一个控制台项目并获得客户端ID ..Google+的登入不回我的应用程序

我做我的应用程序实现的登入按钮,它的工作原理,但登录后它不回到我的应用程序,它会转到谷歌网站。

这里是我的代码:

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]; 
} 
+0

看看那个。 http://*.com/questions/18092644/google-plus-api-doesnt-return-to-app-on-login –

我不知道你要求的验证方法。在结束

Add方法调用,就像这样:

signIn = [GPPSignIn sharedInstance]; 
signIn.clientID = kClientId; 
signIn.scopes = [NSArray arrayWithObjects: 
       kGTLAuthScopePlusLogin, // defined in GTLPlusConstants.h 
       nil]; 
signIn.delegate = self; 
[signIn authenticate];