4

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) {

    });

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);
    }); 

I have tried with parameter "user_mobile_phone" also still getting undefined response only

Please help me to resolve this, thanks in advance.

Rana
  • 101
  • 2
  • 2
  • 11

1 Answers1

7

There is no way to get the phone number, those phone permissions do not exist.

There are other threads about this already, for example: Facebook API, Phone Numbers

luschn
  • 68,448
  • 8
  • 104
  • 118
  • Can we get explicitly passing phone number parameter in request? – Pramod Kharade Dec 20 '17 at 07:59
  • 2
    please read my answer again: "there is no way". there´s not even a permission for the phone number. – luschn Dec 20 '17 at 08:01
  • Thanks luschn , Suppose i have registered FB with phone number then also we can't get phone number information ? – Rana Dec 20 '17 at 08:06
  • 3
    LOL :D :D :D there is NO WAY and people keep asking :D As of today there still is NO WAY https://developers.facebook.com/docs/facebook-login/permissions#user-data – SkyWalker Jun 09 '19 at 13:19