gpt4 book ai didi

android - Facebook Session 对象具有 "email"权限,但 Request.executeMeRequestAsync(...) 不返回电子邮件

转载 作者:行者123 更新时间:2023-11-29 01:52:48 25 4
gpt4 key购买 nike

我正在重写一个应用以包含 Facebook 登录,我想获取用户的电子邮件地址。我已在 Session 对象中请求权限并仔细检查它我可以看到它确实具有此权限。然而,当我调用

Request.executeMeRequestAsync(session, this);

StatusCallback#call(...) 方法(父 Activity 实现此回调和其他回调)我没有得到电子邮件地址。

@Override
public void onCompleted(GraphUser user, Response response) {
Object emailObject = user.asMap().get("email"); //this is null
//...
}

此外,调用

Request.executeGraphPathRequestAsync(session, "me?fields=email", this);

给我一​​个 OAuthException,尽管我使用的是成功获取用户的相同 Session

我检查了 Session#getPermissions() 并且我确实有电子邮件权限。为什么我收不到电子邮件?

最佳答案

问题描述如下:

https://developers.facebook.com/bugs/482815835078469/

评论者之一 Mai Khánh 写道:

I found why this happened, please thumbs up so that support team can be noticed.

1/ Go to this link: https://www.facebook.com/settings?tab=account&section=email&view.

2/ Look at Primary email editing form, if the radio button isn't checked by default, the bug will appear.

I think this is cause by facebook system sometime confusing when a facebook account has more than 1 email.

My temp solution: Add more random email to that account -> the form will ask you to select primary email -> choose primary email -> fill in passwork, then submit -> done.

The point is if you just check primary account without adding another random email, when everything done then you get back -> the edit form still not checked any primary email.

这成功了。这是一个 Facebook 错误。

关于android - Facebook Session 对象具有 "email"权限,但 Request.executeMeRequestAsync(...) 不返回电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16970749/

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