Integrating with Contact APIs in PHP
October 6, 2008 at 6:13 am 2 comments
So for the last week and change I’ve been working with the various contact API’s of 4 of the major email providers.
Google has been the easiest to work with, but it is also one of the least secure. It’s built on their Gdata platform, so you know it’s very well documented. It’s only downfall is that it does not require the user to enter their login information through google. This leaves it wide open for spammers to create phishing scams. Be cautious when a site asks you to invite your google contacts. If it’s not a website that you 100% trust, such as facebook or myspace, it might be best just to enter your contacts manually. You can check out the Google Contacts Data API here.
Yahoo implements a handshake-style authentication protocol, which is pretty smooth and will hopefully leave the user feeling more secure with their personal information. It requires the user to login through Yahoo and then Yahoo passes an authentication token back to your application. There’s still the potential for phishing scams, you be sure that you check your location bar and see yahoo.com (or .ca, .co.uk, etc) in the top-level domain. The Yahoo API is well documented and quite simple to use. It’s probably my favorite implementation. You can check out the Yahoo! Address Book API here.
Hotmail also implements a handshake-style authentication protocol. However, the documentation is poor and quite confusing. I think I spent more time following links in the MSDN than actually coding. Microsoft also offers an SDK which, though poorly documented and slightly confusing, I would not have been able to get by without. You can check out the Windows Live Contacts API here.
AOL is the worst of the 4. They’re so behind the times that they still haven’t even released a contacts API. If you want to allow your users to import their AOL contacts, you’ll have to sink down to the level of screen scraping. Hopefully you’ll be able to check out the AOL Address Book Open Services here some day soon!
I’m actually surprised that no one has implemented integration with these contact API’s for the Zend Framework yet, seeing as how much of a sought after commodity they are in these days of social networking sites. I guess now all that’s left for me to do is to clean up some of the code and write a couple of Zend Framework proposals!
Entry filed under: Uncategorized. Tags: .
1.
wllm | October 6, 2008 at 9:27 pm
Please do!
,Wil
2.
Trevor Johns | October 8, 2008 at 7:42 am
Chris,
While the Google Contacts API doesn’t require logging in directly through Google, support for this is provided through either AuthSub or OAuth. More information on this is here:
http://code.google.com/apis/accounts/docs/AuthForWebApps.html
As for adding support to Zend Framework, we’re currently working on this. There’s a ticket open that’s currently being worked on in the Zend Framework issue tracker:
http://framework.zend.com/issues/browse/ZF-3369
–
Trevor Johns
Google Developer Programs