Php – How to invite people from MSN, Yahoo into the application


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?

Best Solution

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:

Google also has one:

And so does Windows Live:

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.