Please follow the following steps to import contacts from hotmail or Microsoft live account.
Before doing this you need to generate Client ID and Client secret. Click Here to generate both the keys.
You need to set Client id and Client secret which you have
generated in the above URL in config.php file and also set the
return URL, it must be same URL you set in your application in
account.live.com.
<?php $client_id = '***********'; $client_secret = '*************'; $redirect_uri = 'Path To/result.php'; ?>
Next you need the authorization URL. On click of invite button
it will take you to Live.com where you will provide your login
information and on successful logged in the system will return you
to result page.
$url = 'https://login.live.com/oauth20_authorize.srf?client_id='.$client_id.'& scope=wl.signin%20wl.basic%20wl.emails%20wl.contacts_emails&response_type=code& redirect_uri='.$redirect_uri;
Once you gave permission to access your content, it will redirect to result.php file, where it will show you the list of friends and now you can save the list to your database or send mail etc.