xamarin / FacebookComponents

MIT License
88 stars 70 forks source link

Cannot Login With Facebook on Android #219

Open raymonderasmus opened 3 years ago

raymonderasmus commented 3 years ago

We have been using this package for sometime now, and everything was working perfectly.

Facebook made these changes: https://developers.facebook.com/docs/facebook-login/android/deprecating-webviews and now we get the following error when trying to login with facebook: "For your account security, logging in to Facebook from an embedded browser is disabled. You may be able to continue by updating the app you're logging in from and trying again."

Following the article on facebook developers its not clear to me what version of the Facebook sdk version 7.1.0 of Xamarin.Facebook.Android is using. I saw this issue: https://github.com/xamarin/FacebookComponents/issues/210 and I see in the pr that it is using version 8.2 of the Firebase Sdk, am i correct?

If so how do we get login to work again with this package? This is the implementation I am using in my app currently: https://evgenyzborovsky.com/2018/03/09/using-native-facebook-login-button-in-xamarin-forms/

Any help or being pointed in the right direction will be appreciated!

bnoffer commented 2 years ago

This change was announced by Facebook in June. What you have to do is remove any options forcing the Login button to a specific login behaviour. Using the latest update It should then open in a external browser.

Here is the link to the announcement: https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers/

playa92 commented 2 years ago

Hi, We are having the same problem on our app on Xamarin Android. If we download and use chrome, firefox or the facebook app then the login works otherwise we see the error message: "For your account security, logging in to Facebook from an embedded browser is disabled. You may be able to continue by updating the app you're logging in from and trying again." We have also updated to the latest version 11.2.0.1 (Nugets) and made sure there are no references to login behaviour.

mhdwaelanjo commented 9 months ago

We can use this library now Facebook Audience Network SDK for .NET for Android Anjo.Android.Facebook.AudienceNetwork (>= 6.16.0) and for login Anjo.Android.Facebook (>= 16.2.0)