我使用Satellizer做Facebook登录,除了Facebook没有返回所有的用户信息,它的工作很棒。当我收取我的范围电子邮件和public_profile时,我只能获取姓名和身份证件,但没有收到电子邮件。Satellizer Facebook登录不能返回正确的范围
这里是在客户端上我的FB的配置,并且你可以看到,我所要求的电子邮件和public_profile:
facebook: {
clientId: 'xxxxxxx',
url: '/api/public/authentication/facebook',
authorizationEndpoint: 'https://www.facebook.com/v2.3/dialog/oauth',
redirectUri: window.location.protocol + '//' + window.location.host + '/', // window.location.origin || window.location.protocol + '//' + window.location.host + '/'
scope: 'email,public_profile',
scopeDelimiter: ',',
requiredUrlParams: ['display', 'scope'],
display: 'popup',
type: '2.0',
popupOptions: { width: 481, height: 269 }
},
在服务器上,这样的:
request.get({ url: graphApiUrl, qs: accessToken, json: true }, function(err, response, profile) { ....
只有给出的配置文件的id和名称像这样:
profile = Object {name: Denis, id: xxx}
不知道我在做什么错,为什么我没有得到电子邮件,头像...
谢谢。
看到我的答案在这里http://stackoverflow.com/questions/34740186/how-to-get-email-from-facebook-through-guzzle-in-laravel 我希望它能解决您的问题 – C2486