I have created a project with Google OAuth2
credentials for use with Google calendar.
However the access toke expires in every 1 hour.
Can someone please help me change the expire time to 1 day.
I have use this code to access the google calendar events:
$client = new Google_Client();
$client->setApplicationName("Client_Library_Examples");
$client->setClientId($client_id);
$client->setClientSecret($client_secret);
$client->setRedirectUri($redirect_uri);
$client->setAccessType('offline');
$client->setScopes(array('https://www.googleapis.com/auth/calendar'));
if (isset($_GET['code']))
$google_oauth_code = $_GET['code'];
$client->authenticate($_GET['code']);
$_SESSION['token'] = $client->getAccessToken();
$_SESSION['last_action'] = time();
}