views:

772

answers:

2

Hi, I need to add an invite users functionality to my social networking application so users can invite contacts from their hotmail or yahoo accounts. How do I do this and are there any free open source libraries that do this?

+3  A: 

Depending on the service you wish to get the contact information from they might already provide a published API for you.

For example, Yahoo has a contact list API you could use: http://developer.yahoo.com/social/rest_api_guide/contact_api.html

Google also has one: http://code.google.com/apis/contacts/

And so does Windows Live: http://msdn.microsoft.com/en-us/library/bb463974.aspx

If you need something to work with a service without an API then you might have to ask that user for his username and password, use it temporarily to log into his account, download the contact information and then discard the login details. There are obvious privacy and security issues with this approach, however. Nevertheless, it is used quite frequently by many social networking sites.

The same approach can also be used to retrieve buddy information from instant messaging services. You log in (perhaps using an open source IM API) and get their buddy list and contact details.

Andre Miller
A while ago Jeff wrote a nice article about this very issue:http://www.codinghorror.com/blog/archives/001128.html
n3rd
Ah, thanks for that link. That article pretty much says it all.
Andre Miller
A: 

Just in case anyone was interested - I would like to share this neat piece of code I found off the web. Its free and very easy to setup and integrate. http://openinviter.com is php based and you can extract email contacts from just about any address book there is.

You just need to have curl set up for this.

Ali