Google Plus PHP Login -


i trying make google+ login php, working there piece of code:

if(isset($_get['code'])) {     $client->authenticate($_get['code']);     $_session['access_token'] = $client->getaccesstoken();     $redirect = 'http://'.$_server['http_host'].$_server['php_self'];     header('location:'.filter_var($redirect, filter_sanitize_url)); } 

and when put localhost/?code in url gives me error :

fatal error: uncaught exception 'invalidargumentexception' message 'invalid code' 

is there way handle ?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -