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
Post a Comment