Unable to Access User's email. Getting “Undefined”

后端 未结 7 2066
日久生厌
日久生厌 2021-01-13 19:13

I have a website with the Facebook login implementation. My app has the permission for the user\'s email. Even though the user logs into my app using Facebook I can only ret

7条回答
  •  醉话见心
    2021-01-13 19:58

    You now have to specify the fields you want to get, it´s called "Declarative Fields":

    FB.api('/me', {fields: 'name,email'}, function(response) {
      console.log('Good to see you, ' + response.email + '.');
    });
    

    See the changelog for more information: https://developers.facebook.com/docs/apps/changelog#v2_4

提交回复
热议问题