Advertisement
Bagosep

Config

Jun 9th, 2021
1,018
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. //Include Google Client Library for PHP autoload file
  4. require_once 'vendor/autoload.php';
  5. //Make object of Google API Client for call Google API
  6. $google_client = new Google_Client();
  7. //Set the OAuth 2.0 Client ID
  8. $google_client->setClientId('PASTE CLIENT ID');
  9. //Set the OAuth 2.0 Client Secret key
  10. $google_client->setClientSecret('PASTE SECRET KEY');
  11. //Set the OAuth 2.0 Redirect URI
  12. $google_client->setRedirectUri('http://localhost/sample-musik/login_google.php');
  13.  
  14. $google_client->addScope('email');
  15. $google_client->addScope('profile');
  16.  
  17. session_start();
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement