React facebook login is not working some browser?

Viewed 28

I am trying to apply the react-facebook-login package in my project. But I am getting some problems with the package implementation. It is not working in some browsers like Microsoft edge and google chrome. But it is working in Mozilla firefox and some mobile browser.

Actually, it is not opening a pop-up in those browsers. I am trying to allow popup and redirect, But not working.

Can anyone give a possible problem and solutions about this?

Updated

import FacebookLogin from "react-facebook-login/dist/facebook-login-render-props";

<FacebookLogin
    appId = { process.env.NEXT_PUBLIC_FACEBOOK_APP_ID as string }
    autoLoad = { false}
    fields = "name,email,picture"
    callback = { responseFacebook }
    onClick = {() => console.log("clicked")}
    render = {(renderProps: any) => (
        <ButtonBase sx={styles.FacebookButton} onClick={renderProps.onClick} disabled={faLoading}>
            <Icon icon="bi:facebook" />
            Continue with Facebook
            {faLoading &&
                <CircularProgress size={16} sx={{ color: "background.default", ml: "10px", mb: "-2px" }} />
            }
        </ButtonBase>
    )}
/>
0 Answers
Related