Facebook,使用Facebook SDK登录后如何获取电话号码? [英] Facebook , How to get phone number after login with facebook sdk?
问题描述
我已经集成了FB sdk用于客户登录,但无法获取电话号码作为响应. 这是我的代码
I have integrated FB sdk for customer login and not able to get phone number in response. Here is my code
FB.api('/me',
{fields: "id,email,first_name,gender,name,last_name,token_for_business"},
function(response) {
});
使用上面的代码,我将获得所有信息,以及电话号码.我已经传递了额外的参数 mobile_phone ,然后得到未定义的响应. 这是代码
With that above code, I am getting all information expect phone number. I have passed extra parameter mobile_phone then getting undefined response. Here is code
FB.api('/me',
{fields: "id,email,first_name,gender,name,last_name,token_for_business,mobile_phone"},
function(response) {
console.log(response.mobile_phone);
});
我尝试使用参数"user_mobile_phone"也仅获得未定义的响应
I have tried with parameter "user_mobile_phone" also still getting undefined response only
请先帮助我解决此问题.
Please help me to resolve this, thanks in advance.
推荐答案
无法获取电话号码,这些电话权限不存在.
There is no way to get the phone number, those phone permissions do not exist.
已经有与此相关的其他主题,例如: Facebook API,电话号码
There are other threads about this already, for example: Facebook API, Phone Numbers
这篇关于Facebook,使用Facebook SDK登录后如何获取电话号码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!