Facebook Api does not receive the Email permission

-1

Hello, I'm having a serious problem with the Facebook API, I've tried getting the email to my OAuth system, but the api returned null, debugging the process, I discovered that the APP is not actually requesting permission from Email. Anyone know what I can do?

Here are the API permissions:

Herearethepermissionsrequiredduringaccess:

    
asked by anonymous 17.10.2016 / 20:50

1 answer

0

HTML:

Basically, once the login is done, it will call the callLoginMethod () method that will display the information.

<div class="fb-login-button" data-scope="email,user_birthday,user_hometown,user_location,user_location" data-max-rows="1" data-size="medium" data-show-faces="false" data-auto-logout-link="false" onlogin="callLoginMethod();" login_text="Entrar com o Facebook"> </div>

Javascript:

window.fbAsyncInit = function() {
    FB.init({
      appId      : SEU_APP_ID,
      xfbml      : true,
      version    : 'v2.8'
    });
  };



 (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en_US/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));

function basicAPIRequest() {
    FB.api('/me', 
        {fields: "id,picture,birthday,email,first_name,gender,name,location,hometown"}, 
        function(response) {
          console.log('Resposta:', response);

        }
    );
  }

  function callLoginMethod() {
    FB.getLoginStatus(function(response) {
        if (response.status === 'connected') {
            basicAPIRequest();
        } else {
            FB.login();
        }
    }); 
  }
    
17.10.2016 / 21:56