Hi Staffs & Community!
I have this business app that requires social login/signup. Facebook part is done easily via the plugin. Is there a way to do it with google+? I did some read up on the forum but mostly cover other areas. Any help is appreciated. Thanks!
Regards,
Vincent
Alex10
April 14, 2015, 7:06pm
2
Thanks Alex, i found a quick a solution to this via this link.
https://developers.google.com/identity/protocols/OAuth2WebServer
After retrieving the token via the listener. I subsequently access the APIs stated here.
https://developers.google.com/+/api/latest/people/get#response
webView = native.newWebView( display.contentCenterX, 32, display.contentWidth, display.contentHeight-132 ) webView.anchorY = 0; webView:request( "https://accounts.google.com/o/oauth2/auth?" .."redirect\_uri=https://www.example.com/oauth2callback" .."&response\_type=code" .."&client\_id=1234451500376-ab24tim8pl9sml72ho8ralipnhmp2oe8.apps.googleusercontent.com" .."&scope=email+profile" .."&approval\_prompt=force&access\_type=offline" ) displayGroup:insert(webView)
Hope this will also help anyone who wants to do google login :D.
Alex10
April 14, 2015, 7:06pm
4
Thanks Alex, i found a quick a solution to this via this link.
https://developers.google.com/identity/protocols/OAuth2WebServer
After retrieving the token via the listener. I subsequently access the APIs stated here.
https://developers.google.com/+/api/latest/people/get#response
webView = native.newWebView( display.contentCenterX, 32, display.contentWidth, display.contentHeight-132 ) webView.anchorY = 0; webView:request( "https://accounts.google.com/o/oauth2/auth?" .."redirect\_uri=https://www.example.com/oauth2callback" .."&response\_type=code" .."&client\_id=1234451500376-ab24tim8pl9sml72ho8ralipnhmp2oe8.apps.googleusercontent.com" .."&scope=email+profile" .."&approval\_prompt=force&access\_type=offline" ) displayGroup:insert(webView)
Hope this will also help anyone who wants to do google login :D.
I was trying to implement the samething.
My question is, what should i do with redirect_uri? What this has to be?
Trying to implement google login. So need help or examples with that.
[lua]
webView:request( "https://accounts.google.com/o/oauth2/auth?"
…“redirect_uri= ???”
…"&response_type=code"
…"&client_id="… client_id
…"&scope=email+profile"
…"&approval_prompt=force&access_type=offline" )
[/lua]
I was trying to implement the samething.
My question is, what should i do with redirect_uri? What this has to be?
Trying to implement google login. So need help or examples with that.
[lua]
webView:request( "https://accounts.google.com/o/oauth2/auth?"
…“redirect_uri= ???”
…"&response_type=code"
…"&client_id="… client_id
…"&scope=email+profile"
…"&approval_prompt=force&access_type=offline" )
[/lua]