I am using the following
http://www.ibm.com/developerworks/opensource/library/x-phpgooglecontact/index.html
to authenticate to Google and retrieve a users contacts. However I would prefer this system to use Google's oAuth integration.
What is the easiest way to do this or a simple example?
Essentially I want to modify this
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, 'cp');
$gdata = new Zend_Gdata($client);
$gdata->setMajorProtocolVersion(3);
// perform query and get feed of all results
$query = new Zend_Gdata_Query(
'http://www.google.com/m8/feeds/contacts/default/full');
$query->maxResults = 1000;
$query->setParam('sortorder', 'descending');
$feed = $gdata->getFeed($query);
Such that it now uses oauth2 such that a user never has to give their email or password.
I found the following tutorial which resolved my problem.
http://leandroardissone.com/post/1330339821/google-contacts-php