facebook API中的间歇性丢失电子邮件地址 [英] Intermittent missing email address in facebook API

查看:122
本文介绍了facebook API中的间歇性丢失电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用带有OAuth令牌的https://graph.facebook.com/me请求来获取有关该用户的属性。电子邮件地址是我们需要的属性之一,当我们请求访问时,我们明确地请求该权限。

My application uses the "https://graph.facebook.com/me" request with an OAuth token to obtain properties about the user. Email address is one of the properties we need, and we do explicity request that permission when we request access.

99%的时间工作正常,但是在几个有时候响应没有任何对象在jSON数据中被命名为电子邮件。

It's working fine 99% of the time, but on a few occasions the response comes back without any object in the jSON data named "email".

有没有解释为什么会发生这种情况,例如一个用户可以授予我们许可,但仍然阻止其电子邮件地址?或者可以在另一个键下找到?

Is there an explanation as to why this might happen, such as a way a user could grant us permission but still block their email address? Or could it be found under another key?

谢谢。

推荐答案

简短答案:并非所有用户都有可用的电子邮件地址,而那些可能没有有效的可达到的电子邮件地址

Short answer: Not all users have an email address available and those who do may not have a valid, reachable email address

用户的电子邮件字段对象( https://developers.facebook.com/docs/reference/api/user/ )澄清了这里的预期行为,即:
如果没有有效的电子邮件地址,则不会返回此字段可用

The documentation for the email field of the user object ( https://developers.facebook.com/docs/reference/api/user/ ) clarifies the expected behaviour here, which is: "this field will not be returned if no valid email address is available"

在某些情况下,您可能认为用户应该返回一个电子邮件地址,但不会。一些常见的原因:

There are a number of circumstances in which you may think a user should have an email address returned but they will not. Some common reasons:


  • 否帐户上的电子邮件地址

  • 没有确认的,经过验证的电子邮件地址

  • 用户输入了一个安全检查点,要求他们重新确认他们的电子邮件地址,但尚未完成。

  • 用户的电子邮件地址无法访问>
  • No Email address on account
  • No confirmed, verified email address on account
  • User entered a security checkpoint which required them to reconfirm their email address and they have not yet done so
  • Users's email address is unreachable

您还需要电子邮件扩展权限(用户可以选择不允许)即使是具有有效,确认的可达到的电子邮件地址的用户。

You also need the email extended permission (which users can choose not to allow), even for users who have a valid, confirmed, reachable email address on file.

这篇关于facebook API中的间歇性丢失电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆