Facebook Callback JSON有时不返回电子邮件 [英] Facebook Callback JSON does not return email sometimes

查看:68
本文介绍了Facebook Callback JSON有时不返回电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Facebook Graph API.

Facebook Graph API.

我正在请求电子邮件许可,并且除某些用户外,它一切正常,json不返回电子邮件字段.我不知道为什么会这样.代码是相同的,它对所有用户都适用,返回除100个中的1个左右的电子邮件字段(在json中没有此字段的用户).其他所有字段都在那里.

I am requesting email permission and it works all fine except for some users, the json does not return email field. I am not sure why this happens. The code is same and it works great for all users, returns email field except 1 in 100 or so users where it does not have this field in json. All other fields are there.

有人在??之前遇到过这个问题吗?

Has anyone faced this problem before ??

我检查了facebook的隐私设置,如果用户授予对Facebook应用程序的电子邮件访问权限,没有什么可以阻止电子邮件进入json,但这是我正在发生的事情.我在网上搜寻,似乎没有其他人面对这个问题.

I checked the facebook privacy settings and there is nothing that prevents email from coming in json if user grants email access to facebook app, yet this is happening to me. I searched the net and no one else seems to be facing this issue.

任何提示将不胜感激

推荐答案

永远不要假设Facebook将向您发送什么信息,永远不要期望每个字段都存在并且永远不要期望Graph请求执行您想要的事情.

Never makes assumptions about what Facebook will send you, never expect every field to be present and never expect a Graph request to do what you want.

Facebook有时会执行类似的操作,在某处或某处缺少字段,在其他地方出现隐秘和意外错误……尽管这无害,但要注意的是,它也发生在关键位置,例如在用户启动网站时发送的signed_request中.应用程序.

Facebook sometimes do things like this, a missing field here and there, a cryptic and unexpected error somewhere else… While it can be no harm be aware that it also happens in critial places like in the signed_request sent when an user launches an app.

您还必须知道,您的" Facebook可能不是所有人的Facebook.他们对代码进行地理和某种程度上的随机部署.在没有任何特殊原因的情况下,可能会向某人显示对每个应用程序隐藏您的电子邮件地址的选项,但对其他人不会出现.

You also have to know that 'your' Facebook may not be everyone else's Facebook. They do geographic and somewhat random deployments of their code. An option to hide your e-mail address to every application could appear for someone but not for someone else, without any particular reason.

考虑到您的特定问题,我怀疑是否可以选择将您的电子邮件地址隐藏到具有邮件许可权的应用程序中,但是如果该许可权不是强制性的,则有人可以接受您的应用程序,并在以后自动选择可选的许可权.

Considering your particular issue, I doubt there is an option to hide you e-mail address to an app who has the mail permission, but if the permission is not mandatory someone could accept your app and cherry-pick optional permissions later.

这篇关于Facebook Callback JSON有时不返回电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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