gpt4 book ai didi

apache-flex - Facebook Graph API 和 friend 的电子邮件

转载 作者:行者123 更新时间:2023-11-30 05:17:13 27 4
gpt4 key购买 nike

在 StackOverflow 上有一些关于 facebook 和电子邮件的问题,但在阅读它们之后,我仍然无法检索用户的电子邮件。

我们的应用程序在 Flex 上实现并使用 REST API。之前它使用 notifications.sendEmail。应用具有 publish_stream 和电子邮件权限(通过 users.hasAppPermission 检查)。

我尝试使用 users.getInfo 来获取 proxied_email 地址。但是这个函数不返回 friend 的电子邮件地址..

然后我使用 Graph API 和网络浏览器执行了以下测试:

  1. 打开以下链接以获取具有扩展权限的授权:

    https://graph.facebook.com/oauth/authorize?client_id=[app_id]&scope=publish_stream,offline_access,email&redirect_uri=http://www.facebook.com/connect/login_success.html

它返回了用于检索 access_token 的代码

  1. 打开以下链接获取access_token

graph.facebook.com/oauth/access_token?client_id=[app_id]&client_secret=[secret]&code=[code]&redirect_uri=http://www.facebook.com/connect/login_success.html

它返回了 access_token。现在我可以使用 GraphAPI 了。

  1. 使用我的帐户测试

graph.facebook.com/me?access_token=[token]

好的。它返回了我的邮箱。

  1. 与我的 friend 一起测试

    graph.facebook.com/[friend_id]?access_token=[token]

这里没有电子邮件字段!

所以我的问题是

我哪里错了?是否可以通过 Facebook API(GraphAPI 或 REST API)获取 friend 的电子邮件?

谢谢。

最佳答案

电子邮件权限仅允许访问您的电子邮件。

如果您查看 extended permissions页面上写着:

Likewise, to protect the privacy of users who have not explicitly authorized your application, your application will only be able to access the basic profile information about a user's friends, like their names and profile pictures. If your application needs to access other data about a user's friends to enable social functionality, you will need to request some of the special friends permissions listed below.

如果您查看下表,它会显示 friend 的电子邮件权限“不可用”。

关于apache-flex - Facebook Graph API 和 friend 的电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3889463/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com