Open amitrana4 opened 6 years ago
If we need page list and other info of user we need to pass a scope which add permission links in facebook auth page while login.
Solution : We need to add more scope like below.
return new Promise(function (resolve, reject) { FB.login(function (response) { if (response.authResponse) { var /* @type {?} / accessToken_2 = FB.getAuthResponse()['accessToken']; FB.api('/me?fields=name,email,picture', function (res) { resolve(FacebookLoginProvider.drawUser(Object.assign({}, { token: accessToken_2 }, res))); }); } }, { scope: 'email,public_profile,manage_pages,pages_manage_instant_articles,pages_show_list,publish_pages,read_insights' }); });
If we need page list and other info of user we need to pass a scope which add permission links in facebook auth page while login.
Solution : We need to add more scope like below.
return new Promise(function (resolve, reject) { FB.login(function (response) { if (response.authResponse) { var /* @type {?} / accessToken_2 = FB.getAuthResponse()['accessToken']; FB.api('/me?fields=name,email,picture', function (res) { resolve(FacebookLoginProvider.drawUser(Object.assign({}, { token: accessToken_2 }, res))); }); } }, { scope: 'email,public_profile,manage_pages,pages_manage_instant_articles,pages_show_list,publish_pages,read_insights' }); });