Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Uncaught Error: Class 'GoogleOAuth2Handler' not found i #8

Open
juniorneo2 opened this issue Jul 16, 2018 · 3 comments
Open

Comments

@juniorneo2
Copy link

juniorneo2 commented Jul 16, 2018

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.

@juniorneo2
Copy link
Author

I solved it, include these two path and it worked.

use RapidWeb\GoogleOAuth2Handler\GoogleOAuth2Handler;
use RapidWeb\GooglePeopleAPI\GooglePeople;

@QuesnelJ
Copy link

QuesnelJ commented May 8, 2020

I had the same issue. This solved it. Maybe these lines need to be added to the documentation. Good job juniorneo2.

@irvine48
Copy link

irvine48 commented Mar 24, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants