-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login is not working in "facebook mobile browser" on facebook android app(not facebook lite) #303
Comments
Same issue |
I think this is because by default it uses the user agent and it could be outdated:
But perhaps it should be something else: |
I have the same issue. Does anyone came up with a fix for this? |
i also have this same issue, any update? |
Same here, it is also very critical for my project, any one has some news on this ? Thanks |
I have a solution and it is to start using the redirect method instead of the popup. after the redirect you have access from the url to the idToken or the AccessToken depends on the prop you give to the component and then just use a hook on the route you want it to redirect that parses the query string and make the request to your backend, |
@ilan0888 could you please share the code in order to help to integrate this ! Thanks in advance |
@ilan0888 can you please share the code. It will be a great help. |
I was having a similar issues, wich I solved using |
So you solved it by disabling the mobile redirect, and @ilan0888 solved it by enabling it? |
@ronytesler Yeah I've also been reading contradicting solutions. Others have suggested setting isMobile={false} or using other methods to detect the user agent, since the mobile browser may not be recognized properly by react-facebook-login. |
Yes, I'm going to try the accepted answer here: |
Not yet, but I believe we also need to look for the Instagram or Facebook browser. Something similar to this: For Facebook: https://stackoverflow.com/questions/31569518/how-to-detect-facebook-in-app-browser Waiting for my client to show the link to our site on his IG account again so I can do some testing. Let me know if you have any luck. |
@Kokopelli84 If there's a problem with mobile detection, we need to set isMobile={true}, no? Because we're running on mobile. |
@ronytesler I just tried it and setting isMobile={true} doesn't work as well. I used the following code to hide the facebook login for my client on FB and IG in-app browsers. Maybe it will help someone until we can come up with a stable solution. Using this question on Stackoverflow as a reference, on your login component you can use this function to detect if we are on the FB or IG in-app browser:
Then use it to conditionally render your Facebook component inside your Login component:
I believe though that the answer might be setting |
try it
|
@jackkidding How did you implement it? I don't see any example or explanation. Can you share your code? |
@jackkidding I think it works, thanks! |
@jackkidding It is kind of working for me on the IG in-app browser, but with a few glitches. The first time I press "Log in with FB" it takes me to FB to login where it asks for my email and password. Then it redirects me back to my app, but does not log in to my app. After clicking on the "Log in with FB" button again, THEN it works and without having to enter my email and password on FB! Now I just have to figure out how to make it work on the first log in attempt... |
@Kokopelli84 Maybe you can use autoLoad={true} and add a flag to the redirectUri that tells your app to do a refresh, then it will hopefully login automatically. |
@ronytesler @jackkidding
|
@IndraVikas I think it's not working for you because you have isMobile={false}. isFacebookApp = () => {
|
@ronytesler I tried the above solution It is not working for me. :( ` <FacebookLogin |
@IndraVikas Nothing happens when you click the login button? |
@ronytesler |
@IndraVikas try removing the state if you don't need it. |
Same issue
|
@frontend-oleh-k No, you should use disableMobileRedirect={false}. isMobile is automatically detected. <FacebookLogin |
@ronytesler i used this last config you sent above, but it doesnt work for iphone, just for android and desktop. Its same for u? |
for me it works on iPhone.. on which browser did you try, Facebook Messenger's? |
yes i tried with isMobile={true}, im login using safari browser and its worked just on iphone 8, on iphone 11 it doesnt worked. |
I have been struggling through this issue for pretty much time. After multiple hit and trial the following configuration works for me.
|
thanks It works to me. autoLoad={true} works in Facebook Browser, and in chrome or desktop browser autoLoad={false} |
thanks this fixed Facebook App Browser issue, but on Messenger issue still remains. |
Yes, Messenger still remains the same issue. |
Have the same, did you find the solution? |
I am facing this issue in facebook mobile browser. When I click a link in the Facebook app (not the Facebook lite app). It opens the URL in the "Facebook mobile browser". Login in this browser is not working.
I am using the following setting.
<FacebookLogin appId={ config.FACEBOOK_APP_ID } autoLoad={ false } fields="name,email,picture" callback={ this.facebookResponse } cssClass="btnFacebook" isMobile={ false } disableMobileRedirect icon={ <i className="fa fa-facebook" style={ { marginLeft: "5px" } } /> } textButton=" Login with Facebook" />
Note. It is working in chrome or other browsers on mobile. It is also working from the Facebook lite app. because it opens the URL in the chrome browser.
Please help it's very critical for my project. Do let me know if more details are required.
Thanks in Advance
The text was updated successfully, but these errors were encountered: