使用Javascript在Facebook上请求扩展权限的正确方法是什么?

使用Javascript在Facebook上请求扩展权限的正确方法是什么?,javascript,facebook,Javascript,Facebook,我应该仍然使用permissions.request吗?还是有新的方法来执行此操作?我看到了相互矛盾的信息。 谢谢 您可以使用范围参数: FB.login(function(response) { if (response.authResponse) { console.log('Welcome! Fetching your information.... '); FB.api('/me', function(response) { console.l

我应该仍然使用permissions.request吗?还是有新的方法来执行此操作?我看到了相互矛盾的信息。 谢谢

您可以使用
范围
参数:

 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 + '.');
       FB.logout(function(response) {
         console.log('Logged out.');
       });
     });
   } else {
     console.log('User cancelled login or did not fully authorize.');
   }
 }, {scope: 'email'});
具有讽刺意味的是,Facebook昨天刚刚与此相关。不久前我也写了一篇关于这个的文章