-1

I am integrating facebook login in my website for which I have created a app on facebook and implement the login code by using Facebook Login Javascript SDK

Even I have added a scope for email id still I am not getting email id of any user in response. Please see below SG:

enter image description here enter image description here

Why I am not getting email id in response even after it is asking permission to user?

Thanks in advance.

andyrandy
  • 72,880
  • 8
  • 113
  • 130
Rakesh Shetty
  • 4,548
  • 7
  • 40
  • 79

1 Answers1

0

I assume you forget to ask for the email field in the API call: /me?fields=name,email

...or with the JS SDK:

FB.api('/me', {fields: 'name,email'}, (response) => {
    console.log(response);
});
andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • I am asking that email scope that is why you can see the screenshot 1 it is asking user for email permission – Rakesh Shetty May 30 '16 at 10:05
  • scope is just for permissions in the login popup. you still have to use the fields parameter to get the email. just try it in your api call. – andyrandy May 30 '16 at 12:36