我使用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