Fatal error: Uncaught Error: Class 'GoogleOAuth2Handler' not found i
juniorneo2 opened this issue ยท 3 comments
Hello
I'm having error in load the library GoogleOAuth2Handler, Somebody Help me?
`require DIR . '/vendor/autoload.php';
$clientId = '#;
$clientSecret = '#';
$refreshToken = '#';
$scopes = ['https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/contacts', 'https://www.googleapis.com/auth/contacts.readonly'];
$googleOAuth2Handler = new GoogleOAuth2Handler($clientId, $clientSecret, $scopes, $refreshToken);
$people = new GooglePeople($googleOAuth2Handler);
$contacts = $people->all();
print_r($contacts);`
Fatal error: Uncaught Error: Class 'GoogleOAuth2Handler' not found in /Applications/MAMP/htdocs/googlecontact/index.php:11 Stack trace: #0 {main} thrown
SO = IOS
PHP = 7.1.2
MAMP
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I solved it, include these two path and it worked.
use RapidWeb\GoogleOAuth2Handler\GoogleOAuth2Handler;
use RapidWeb\GooglePeopleAPI\GooglePeople;
I had the same issue. This solved it. Maybe these lines need to be added to the documentation. Good job juniorneo2.
I solved it, include these two path and it worked.
use RapidWeb\GoogleOAuth2Handler\GoogleOAuth2Handler;
use RapidWeb\GooglePeopleAPI\GooglePeople;
spend few hour to check why this composer package not define!!! thank a tons!