Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

G+ sdk giving login error?

I have implemented Google Plus Api and login as it is given in the site. But it is giving problem after login when I click on allow Access as shown below:

enter image description here

The following message appears :

enter image description here

My Code is as follows,pls tell me If anything left:

    - (void)viewDidLoad
{
 self.signInButton.delegate = self;
 self.signInButton.clientID = kClientId;
 self.signInButton.scope = [NSArray arrayWithObjects:
                            @"https://www.googleapis.com/auth/plus.me",
                            nil];

 SLNetworkAppDelegate *appDelegate = (SLNetworkAppDelegate*)
 [[UIApplication sharedApplication] delegate];
 appDelegate.signInButton = self.signInButton;

 share =[[GPPShare alloc] initWithClientID:kClientId];
 share.delegate = self; // optional
 appDelegate.share=share;

    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (IBAction) didTapShare: (id)sender {
 [[[[share shareDialog]
    setURLToShare:[NSURL URLWithString:@"https://developers.google.com/+/mobile/ios/getting-started"]]
   setPrefillText:@"testing share via google plus"] open];

 // Or, without a URL or prefill text:
 [[share shareDialog] open];
}


In App delegate file:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
 if ([signInButton handleURL:url
           sourceApplication:sourceApplication
                  annotation:annotation]) {
  return YES;
 }
 if ([self.share handleURL:url
         sourceApplication:sourceApplication
                annotation:annotation]) {
  return YES;
 }
 return NO;
}
like image 341
Prince Kumar Sharma Avatar asked Dec 26 '12 06:12

Prince Kumar Sharma


People also ask

How do you solve login error there is an error in logging you into this application please try again later?

To fix this issue, Make sure you already uploaded your app to the play store and enabled “app signing by Google Play”. Now convert your SHA-1 to a valid key hash using any of these methods.

How do I fix the 403 user Rate limit exceeded?

Resolve a 403 error: Project rate limit exceededRaise the per-user quota in the Google Cloud project. For more information, request a quota increase. Batch requests to make fewer API calls. Use exponential backoff to retry the request.

How do I fix Google authorization error 403?

You can try to fix error 403 in Google Chrome by refreshing the page, double-checking the address, clearing the cache and cookies from your browser, confirming that you have the authorization to view the page, contacting the website directly, or returning to the page later.


1 Answers

You have to assign redirect uri in your project with your bundle ID like this so after successful authentication your application will be launched from safari if your handle your url properly:

enter image description here

Place bundle Id as identifier and URLSchemes...

like image 54
Sumanth Avatar answered Oct 12 '22 08:10

Sumanth