Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google plus Request URI issue

In my application I am using google plus to share things. Here when I press sign in button, it require for email/password and then after login press I got following error.

enter image description here

I have created application using following steps

enter image description here

How do I get right solution and can share things on G+ wall?

I am using following redirect url, which are in my application of G+

signInButton_.scope = [NSArray arrayWithObjects:@"urn:ietf:wg:oauth:2.0:oob",@"http://localhost", nil];
like image 844
iDhaval Avatar asked Nov 13 '22 17:11

iDhaval


1 Answers

The scope property is not a list of redirect URIs, rather the property is a list of OAuth scopes that list the permissions that you will ask the user to grant. The basic scope that you should request for sign in is https://www.googleapis.com/auth/plus.me to get the user's public Google+ identity.

You would list other scopes for access to other services, for example for Google calendar you'd list https://www.googleapis.com/auth/calendar.readonly. Find the appropriate Google REST API documentation that you are interested in to see the scope required for that service.

By setting a URL type with a URL scheme using your bundle ID, your app registers itself as a handler for that scheme (bundle ID). After sharing, Google+ attempts to send your user back to your app by using the bundle ID that you registered in the Console project. More info on URL schemes.

like image 86
BrettJ Avatar answered Nov 15 '22 06:11

BrettJ