PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, July 16, 2022

[FIXED] How to get mobile number from facebook login using jquery?

 July 16, 2022     facebook-graph-api, facebook-javascript-sdk, facebook-login     No comments   

Issue

I am trying to work facebook login with javascript but there are some issue faces. If facebook user register with email id then it gets email id but when user register with mobile phone then how can I get mobile_phone?

FB.api('/me', 'GET',  {fields: 'email,name,id'},function(response) {
                console.log(response);
                var id = response.id;
                var name = response.name;
                var email = response.email;

    }, {scope: 'email',return_scopes: true});

here is my code. Please help me on this. thanks


Solution

then how can I get mobile_phone?

You can’t.

Facebook does not let normal 3rd-party apps access a user’s mobile number via Graph API.

(You might have seen stuff like the login dialog from Uber, they show the phone number there. But that is because they have some sort of special deal with Facebook that enables them to do this.)



Answered By - 04FS
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing