PWA + Facebook Login Error

Asked

Viewed 23 times

-1

When using facebook’s "Sociallogin" inside a PWA app (installed), the screen turns white and returns nothing.

I’ve tried changing the manifest.json to "standalone","fullscreen","ui-minimal-ui' display didn’t work

The login function on facebook is the abaxio

function loginFacebook2() {
    FB.login(function (response) {
        if (response.authResponse) {
            console.log('Welcome!  Fetching your information.... ');
            FB.api('/me?fields=name,email', function (response) {
                console.log('Good to see you, ' + response.name + '.');

            });
        } else {
            console.log('User cancelled login or did not fully authorize.');
        }
    }, {scope: 'email,publish_stream', redirect_uri: 'Login.php', display: 'touch'})
}

IMPORTANT : in mobile browser and desktop , it opens and closes normally, it does not work only in PWA

1 answer

0

I couldn’t fix it. I put to open a popup pointing to own page when the display was standalone

 if (window.matchMedia('(display-mode: standalone)').matches) {
                window.open('/','Pagina','directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
            } else {
                return loginFacebook();
            }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.