-
Notifications
You must be signed in to change notification settings - Fork 40
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
Problem adding new Contact #14
Comments
Hello! I found the solution. I forgot to add So I need to have these four lines in my script so that everything works. Maybe you want to add that to your documentation:require_once DIR . '/vendor/autoload.php';
|
can you share full script how to create new contact |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I wrote a script where Retrieving and Updating Contacts is working perfect.
The only thing I'm not able to do, is adding a new contact.
I am using it this way as shown in your documentation:
// Create new contact
$contact = new Contact($people);
$contact->names[0] = new stdClass;
$contact->names[0]->givenName = 'Testy';
$contact->names[0]->familyName = 'McTest Test';
$contact->save();
The error message is always the following:
Fatal error: Uncaught Error: Class 'Contact' not found in /var/www/html/googlecontacts/google-contacts.php:34 Stack trace: #0 {main} thrown in /var/www/html/googlecontacts/google-contacts.php on line 34
I have added the script.
Thank you very much for your help!
Arno.
google-contacts.txt
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: