Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. if (file_exists($credentialsPath)) {
  2.  
  3. $accessToken = file_get_contents($credentialsPath);
  4.  
  5. $client->setAccessToken($accessToken);
  6.  
  7. if ($client->isAccessTokenExpired()) {
  8. $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());
  9. $newAccessToken = $client->getAccessToken();
  10. $accessToken = array_merge($accessToken, $newAccessToken);
  11. file_put_contents($credentialsPath, json_encode($accessToken));
  12. }
  13. }
  14.  
  15. Fatal error: Uncaught exception 'LogicException' with message 'refresh token must be passed in or set as part of setAccessToken' in /var/sentora/hostdata/zadmin/public_html/classes/library/youtube/vendor/google/apiclient/src/Google/Client.php:267 Stack trace: #0 /var/sentora/hostdata/zadmin/public_html/classes/library/youtube/youtube.php(26): Google_Client->fetchAccessTokenWithRefreshToken(NULL) #1 /var/sentora/hostdata/zadmin/public_html/channel/apiwrap.php(3): require_once('/var/sentora/ho...') #2 {main} thrown in /var/sentora/hostdata/zadmin/public_html/classes/library/youtube/vendor/google/apiclient/src/Google/Client.php on line 267
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement