facebook - 从 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,不返回任何电子邮件
解决方案
推荐阅读
- java - Java 有异常的麻烦。一个例外不允许我更正我的输入,而另一个例外
- firemonkey - 当我尝试放置圆角时,TRectangle 上的黑色边框
- reactjs - 将formik与material-table集成的好方法是什么?
- docker - 如何使用官方 Tensorflow docker 容器在主机目录中保存和编辑 Jupyter 笔记本?
- typescript - 将 ngif 应用到挂载的组件后不渲染子组件
- c++ - 字符串初始化问题解释
- php - 在 WordPress 中使用 register_theme_directory 进行主题迭代
- swift - CollectionView 中的 CollectionView:使用 didSelectItemAt 执行Segue
- c - 为什么 C 语言 4 个字节上出现一个 char 字符
- c - 管道系统()的标准输出到其他系统的标准输入()