Skip to content

asimlqt/php-google-contacts-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

php-google-contacts-client

PHP client library for accessing Google Contacts

Warning: Do not update contacts using the Entry::save() method if you have groups or photos setup for your contacts. They have not yet been implemented and you will lose that data

Example Usage:

<?php

require_once 'src/Google/Contacts/Autoloader.php';

$accessToken = 'ya29.AHES6ZSe_cWRY4GHXI2PTAn5cIi_l_mVYniFzbTpYyaPux1RgPw';
$serviceRequest = new Google\Contacts\DefaultServiceRequest(new Google\Contacts\Request($accessToken));
Google\Contacts\ServiceRequestFactory::setInstance($serviceRequest);

$service = new Google\Contacts\Service();
$contacts = $service->getAll()->getEntries();

foreach($contacts as $entry) {
    if(!is_null($entry->getName()))
        echo $entry->getName()->getFullName() . "\n";
}

About

PHP client library for accessing Google Contacts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages