Open ssougnez opened 6 years ago
Hello,
when the user tries to login while he already is, the error FB.login() called when user is already connected. appears in the console. I think this could be easily fixed with something like this:
FB.login() called when user is already connected.
FacebookService.prototype.login = function (options) { return new Promise(function (resolve, reject) { try { FB.getLoginStatus((response) => { if (response.status == "connected") { resolve(response); } else { FB.login(function (loginResponse) { if (loginResponse.authResponse) { resolve(loginResponse); } else { reject(); } }, options); } }); } catch (e) { reject(e); } }); };
I just tested it roughly and it seems to be working fine. Additional tests would be nice though.
Hello,
when the user tries to login while he already is, the error
FB.login() called when user is already connected.
appears in the console. I think this could be easily fixed with something like this:I just tested it roughly and it seems to be working fine. Additional tests would be nice though.