keppelen / react-facebook-login

A Component React for Facebook Login
1.18k stars 406 forks source link

Scope not working #344

Open rhd-chris opened 2 years ago

rhd-chris commented 2 years ago

If I add email to the scope parameter it doesn't work. I have added it to my app permissions.

<FacebookLogin
                appId="123456789"
                autoLoad={true}
                onClick={componentClicked}
                callback={responseFacebook}
                scope="public_profile,name,email"
/>

Popup url - the scope parameter is not included:

https://www.facebook.com/login.php?skip_api_login=1&api_key=123456789&kid_directed_site=0&app_id=123456789&signed_next=1&next=https%3A%2F%2Fwww.facebook.com%2Fv2.3%2Fdialog%2Foauth%3Fapp_id%123456789%26cbt%3D1646962078707%26channel_url%3Dhttps%253A%252F%252Fstaticxx.facebook.com%252Fx%252Fconnect%252Fxd_arbiter%252F%253Fversion%253D46%2523cb%253Df13f4ee6ac003%2526domain%253Dfront.test.lndo.site%2526is_canvas%253Dfalse%2526origin%253Dhttps%25253A%25252F%25252Ffront.test.lndo.site%25253A3001%25252Ff545c5786bbec%2526relation%253Dopener%26client_id%3D761311238165555%26display%3Dpopup%26domain%3Dfronttest.lndo.site%26e2e%3D%257B%257D%26fallback_redirect_uri%3Dhttps%253A%252F%252Ffront.test.lndo.site%253A3001%252Flogin%26locale%3Den_US%26logger_id%3Df1c23d56aa19268%26origin%3D1%26redirect_uri%3Dhttps%253A%252F%252Fstaticxx.facebook.com%252Fx%252Fconnect%252Fxd_arbiter%252F%253Fversion%253D46%2523cb%253Df25217312426a8c%2526domain%253Dfront.test.lndo.site%2526is_canvas%253Dfalse%2526origin%253Dhttps%25253A%25252F%25252Ffront.test.lndo.site%25253A3001%25252Ff545c5786bbec%2526relation%253Dopener%2526frame%253Df19508dd373db24%26response_type%3Dtoken%252Csigned_request%252Cgraph_domain%26sdk%3Djoey%26version%3Dv2.3%26ret%3Dlogin%26fbapp_pres%3D0%26tp%3Dunspecified&cancel_url=https%3A%2F%2Fstaticxx.facebook.com%2Fx%2Fconnect%2Fxd_arbiter%2F%3Fversion%3D46%23cb%3Df25217312426a8c%26domain%3Dfront.test.lndo.site%26is_canvas%3Dfalse%26origin%3Dhttps%253A%252F%252Ffront.test.lndo.site%253A3001%252Ff545c5786bbec%26relation%3Dopener%26frame%3Df19508dd373db24%26error%3Daccess_denied%26error_code%3D200%26error_description%3DPermissions%2Berror%26error_reason%3Duser_denied&display=popup&locale=en_GB&pl_dbl=0

If I take the url and add &scope=email it works as intended, so my app settings are ok.

Is there any workaround to this issue, since I see some very old issues of similar reports.

Thanks

rhd-chris commented 2 years ago

I'm using this package instead: https://github.com/seeden/react-facebook

Maoragai12 commented 2 years ago

I'm using this package instead: https://github.com/seeden/react-facebook

@rhd-chris Because of the scopes issue in react-facebook-login, I'm also trying the react-facebook package. It seems that the scopes are working, but now I'm getting completely different error:

Could not link to Facebook You may not be connected to the network or we could not establish a connection with our server. Check your connection and try again later.

Do you also facing this issue?

greatSumini commented 2 years ago

you can use my package instead! https://github.com/greatSumini/react-facebook-login