ZendFramework Google 联系人
我正在使用以下
http://www.ibm.com/ developerworks/opensource/library/x-phpgooglecontact/index.html
向 Google 进行身份验证并检索用户联系人。不过,我更喜欢这个系统使用 Google 的 oAuth 集成。
最简单的方法是什么或一个简单的例子?
本质上我想修改它
$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);
,使其现在使用 oauth2,这样用户就不必提供他们的电子邮件或密码。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现以下教程解决了我的问题。
http://leandroardissone.com/post/1330339821/google-contacts-php
I found the following tutorial which resolved my problem.
http://leandroardissone.com/post/1330339821/google-contacts-php