我如何檢索我的朋友的電子郵件地址?我可以得到所有朋友的名單,但只有他們的名字和身份證。我想我必須添加一些Perms,但我真的不知道如何。一些代碼示例?(Facebook的C#SDK)檢索朋友的電子郵件和生日
同樣的生日問題。
謝謝!
// Nicke
我如何檢索我的朋友的電子郵件地址?我可以得到所有朋友的名單,但只有他們的名字和身份證。我想我必須添加一些Perms,但我真的不知道如何。一些代碼示例?(Facebook的C#SDK)檢索朋友的電子郵件和生日
同樣的生日問題。
謝謝!
// Nicke
未經他們的明確許可,您無法獲得您的朋友的電子郵件地址。他們必須使用「電子郵件」權限授權您的應用程序。
查看Facebook Authentication Permissions page瞭解更多詳情。在這裏,您會在電子郵件權限的「朋友權限」列中看到「不可用」。
至於生日,您需要「friends_birthday」權限。
添加權限的最簡單方法是使用JavaScript library認證
好了,我怎麼以下,而不使用FB-登錄按鈕? 我想在我的網站上使用額外的燙髮。
FB.login(function(response) {
if (response.session) {
if (response.perms) {
// user is logged in and granted some permissions.
// perms is a comma separated list of granted permissions
} else {
// user is logged in, but did not grant any permissions
}
} else {
// user is not logged in
}
}, {perms:'read_stream,publish_stream,offline_access'});
有沒有辦法讓應用程序獲取電子郵件地址,用戶的朋友不妨一試自己。請參閱文檔https://developers.facebook.com/docs/reference/login/email-permissions/