首页 > 解决方案 > 从 facebook 获取电子邮件回复无法获取资源

问题描述

我在 facebook 上使用 hello 进行 oauth。

登录正常,但 Facebook 未返回任何数据。消息是:

哎呀!无法获取资源

hello.init({
       xxxxxxxxxxxxxxxxxxxxxxxxx
    },{ scope: 'email', redirect_uri: RacineSite() });


    hello(type).login({ scope: 'email' });

    hello.on('auth.login', function (auth) {
        if (type == auth.network) {
            hello(type).api('me').then(function (json) {
                alert('Your name is ' + json.email);
            }, function (e) {
                alert('Whoops! ' + e.error.message);
            });
        }
    });

如果 type = google,它的工作正常,但使用 facebook,不返回任何电子邮件

标签: facebookhello.js

解决方案


推荐阅读