3

This is my code using which I am trying to get the mobile number from facebook, but I am unable get the mobile number.

var identity = await AuthenticationManager.GetExternalIdentityAsync(DefaultAuthenticationTypes.ExternalCookie);
var access_token = identity.FindFirstValue("fb_access_token");
var fb = new FacebookClient(access_token);
dynamic myInfo = fb.Get("/me?fields=email,name,gender"); // specify the email field
Email = myInfo.email;
Name = myInfo.name;
string s = myInfo.gender;
Gender = char.ToUpper(s[0]) + s.Substring(1);
Salih Karagoz
  • 2,189
  • 2
  • 22
  • 35

1 Answers1

1

As per best of my knowledge, you cannot fetch mobile number. Find the following list of fields you can fetch through the API

https://developers.facebook.com/docs/graph-api/reference/v2.9/user

Blue
  • 66
  • 1
  • 8