本文介绍了Facebook 电子邮件字段返回空值(即使设置并接受了“电子邮件"权限)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我们应用程序中的某些用户,即使用户已授予对应用程序的电子邮件访问权限,电子邮件字段也会返回 NULL.当我们借助 Debugger 工具检查 scope 参数和用户 Token 的有效性时,一切正常.许可电子邮件已被接受.但是当我们向 Graph API 询问具有有效用户令牌的用户的电子邮件时,它根本没有出现.

For some users in our application, the email field returns NULL even if the user has granted the email access to the app.When we check the scope parameter and the validity of the user Token thanks to the Debugger tool, everything is ok. The permission email has been accepted.But when we ask the Graph API for the email of the user with the valid user token, it does not appear at all.

即使用户授予了电子邮件权限,有没有办法阻止应用接收他的电子邮件?

Is there a way a user could prevent an app from getting his email even if he granted the email permission?

谢谢

推荐答案

我遇到了同样的问题,我想我找到了原因:如果用户在 Facebook 中有一封未经确认的电子邮件(即 Facebook 向他发送了一封验证邮件到用户的电子邮件地址,但他没有回复),即使他给了您电子邮件权限,Facebook 也不会将该电子邮件发送给您的应用.

I had the same problem and I think I found out why:If the user has an unconfirmed email in Facebook (i.e. Facebook sent him a validation mail to the user's email address but he didn't respond) Facebook WILL NOT pass that email to your app even if he gave you the email permissions.

因此,如果用户有用户名(即 userName@facebook.com),我所做的是使用他或她的 Facebook 电子邮件.

So what I did is use his or her Facebook email if the user has a user name (i.e. userName@facebook.com).

这篇关于Facebook 电子邮件字段返回空值(即使设置并接受了“电子邮件"权限)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 19:57