2012-10-25 63 views
3

如果有oauth的aol api可用。使用oauth api獲取aol聯繫人

我想要的是使用oauth導入aol聯繫人。我得到了這樣一個谷歌,雅虎& hotmail。

Hotmail給我電子郵件散列,而不是電子郵件ID。所以,我還會問,如果有一些方法可以使用oauth獲取電子郵件ID,則可用於Hotmail。

謝謝。

回答

1

不,AOL沒有一般可用的OAuth API。我已經搜索過,但無法找到AOL聯繫人的OAuth API。自2008年以來,美國在線的聯繫人API有一個「即將推出」的頁面,但現在似乎已經消失。

要回答您的第二個問題: Microsoft已更改其在您的聯繫人列表中輸入的電子郵件地址的政策。他們不再屬於你,所以不再是你分享他們的權利。您可以使用來自Windows Live的CloudSponge來import contacts,包括電子郵件地址。我們目前支持委派的身份驗證導入,並回退到CSV導入方法。

聲明:我爲CloudSponge工作。

1

要從Hotmail導入朋友的電子郵件地址,我們需要將作用域添加爲「wl.contacts_emails」。

我張貼的完整代碼它

<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> 
+0

感謝您的回覆。我會盡快測試並提供反饋。 – Parth

0

您可以訪問通過CloudSponge AOL的OAuth用戶體驗。

自己嘗試一下這裏: http://www.cloudsponge.com/test-drive

當你在那裏,看看我們的Hotmail整合

...就像一個魅力(無哈希!)!

聲明:我爲CloudSponge工作。