最近因為專案需求,

需要從GMAIL中存取通訊錄 (contacts),

覺得這份教學寫的還不錯:

http://code.google.com/intl/zh-TW/apis/contacts/docs/3.0/developers_guide_protocol.html

與ATOM的溝通可以使用PHPCLASS中的ATOM builder:

http://www.phpclasses.org/package/2745-PHP-Generate-Atom-1-0-XML-feeds.html

溝通的方式可以用PHP 的Socket Programming方式去與https連接埠溝通:

認證:

https://www.google.com/accounts/ClientLogin
The POST body should contain a set of query parameters that look like parameters passed by an HTML form, using the application/x-www-form-urlencodedcontent type. These parameters are:
Parameter Description
accountType Type of account to be authenticated. The default is GOOGLE; if you want to support Google Apps users, use HOSTED_OR_GOOGLE.
Email The user's email address.
Passwd The user's password.
service The service name for contacts feeds is cp. (For other service names, see the service name list.)
source Identifies your client application. Should take the form companyName-applicationName-versionID. The examples use the name exampleCo-exampleApp-1.
For more information about the parameters, see the Authentication for Installed Applications document.

Leave a reply

required

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>