To Import email address of friends from Hotmail we need to add the scope as "wl.contacts_emails".
I am posting the complete code for it
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<script src="//js.live.net/v5.0/wl.js"></script>
<script type="text/javascript">
WL.init({ client_id: **WRITE YOUR CLIENTID HERE**,
redirect_uri: **place ur redirect page url** });
WL.login({ scope: "wl.contacts_emails" }).then(
function(response) {
getContacts();
},
function(response) {
log("Could not connect, status = " + response.status);
}
);
function getContacts() {
WL.api({ path: "/me/contacts", method: "GET" }).then(
onGetContacts,
function(response) {
log("Cannot get contacts: " + JSON.stringify(response.error).replace(/,/g, ",\n"));
}
);
}
function onGetContacts(response) {
var items = response.data;
for (var i = 0; i < 5; i++) {
if (i > items.length) {
break;
}
getContactProperties(items[i].id);
}
}
function getContactProperties(contactId) {
WL.api({ path: contactId, method: "GET" }).then(onGetContactProperties);
}
function onGetContactProperties(response) {
log(JSON.stringify(response).replace(/,/g, ",\n"));
}
function log(message) {
var child = document.createTextNode(message);
var parent = document.getElementById('JsOutputDiv') || document.body;
parent.appendChild(child);
parent.appendChild(document.createElement("br"));
}
</html>