スクリプトに何が起こったのかわかりません。うまく機能していましたが、突然メールを返さなくなりました (undefined が返されます) が、名、姓、およびユーザー名は正常に機能します。
ここにコードがあります
<script type="text/javascript">
// initialize the library with the API key
FB.init({ appId: 'XXXXXXXXXX',status: true, cookie: true, xfbml: true, oauth: true });
function login() {
FB.login(function (response) {
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function (response) {
console.log('Good to see you, ' + response.name + '.email :' + response.email);
console.log('Good to see you, ' + ",gender:" + response.gender + "another : " + response.first_name);
console.log('Good to see you, ' + response.username + '.last_name :' + response.last_name);
// console.log('Good to see you, ' + response);
}, { scope: 'email' });
} else {
console.log('User cancelled login or did not fully authorize.');
}
});
}
</script>
何も変更していませんが、何が問題なのですか?