Android Question [SOLVED] Facebook login blocked on Android devices

Segga

Member
Licensed User
Facebook login has stopped working on the Android version of my app - iOS is still working fine.
The attached screenshot shows the pop-up that blocks the login.

I believe it may be related to Facebook's recent 'Deprecating support for FB Login authentication on Android embedded browsers'.
https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers

Just wondering if anyone else has the same issue and if there is work around for this?
 

Attachments

  • fb login.jpg
    fb login.jpg
    186.6 KB · Views: 23

drgottjr

Well-Known Member
Licensed User
if by "embedded" browser facebook means a webview, i can log in using one (right now). i've seen complaints from some ios users reporting the same message, so not all versions of ios are ok.
 
Upvote 0

Segga

Member
Licensed User
After a bit more research it seems that the Facebook sign only works if the Facebook app is installed on the device - in which case, a message to any users logging in via Facebook would solve the issue.
Can anyone please confirm this is the case?
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
i've read that too. i've 2 devices at hand, neither has the facebook app installed. i can log in using a webview. are you using a webview?
 
Upvote 0

Segga

Member
Licensed User
i've read that too. i've 2 devices at hand, neither has the facebook app installed. i can log in using a webview. are you using a webview?
Before I installed the Facebook app, I could see the login screen in a webview - which was quickly overlayed with the warning pop-up in post1.
After installing the Facebook app (same device as the first post), I was presented with this screen (attached).
I assume that a webview is automatically displayed if the app is not installed?
However, a collegue of mine could not log in - even with the Facebook app installed?
 

Attachments

  • Facebook sign-in.png
    Facebook sign-in.png
    100 KB · Views: 20
Upvote 0

drgottjr

Well-Known Member
Licensed User
first off, it's amusing that facebook claims they're doing something in the name of user security.

if you don't have their app, the only way to log in is either using your device's browser or in an app that uses a webview in place of the browser. a webview doesn't automagically appear.

if your app simply conducts a facebook session in a webview, i see no reason not to use your device's browser. using a pc's browser to access facebook still works. i think i read the same is true for android. if you want to start your app and have the user select "log in to facebook", you can launch the browser with an intent, and then return to your app afterwards.

let's face it; they're pretty much out of control. you're not going to get too far complaining to them that your colleague can't log in even though he has the app, and you can't log in at all, and i can log in using the same tools as you...
 
Upvote 0

Segga

Member
Licensed User
first off, it's amusing that facebook claims they're doing something in the name of user security.

if you don't have their app, the only way to log in is either using your device's browser or in an app that uses a webview in place of the browser. a webview doesn't automagically appear.

if your app simply conducts a facebook session in a webview, i see no reason not to use your device's browser. using a pc's browser to access facebook still works. i think i read the same is true for android. if you want to start your app and have the user select "log in to facebook", you can launch the browser with an intent, and then return to your app afterwards.

let's face it; they're pretty much out of control. you're not going to get too far complaining to them that your colleague can't log in even though he has the app, and you can't log in at all, and i can log in using the same tools as you...
I totally agree!
However, I use the Facebook login (as well as other options) to get a user ID. This let’s me back up their data, files and track subscription statuses.
Although users only have to log in once, if they change phones and can’t log in again, they’ll have no way of accessing their data and files?
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
no offense meant to the forum, but you might want to widen your search to include "stackoverlord" or other source. if facebook app users are also being blocked, non-b4a programmers will be looking for help. my understanding is that changes like this take time to infect, i mean affect all of facebook's servers
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
have you seen this ? sounds like it would be a big change from what you're currently doing (as i understand it). it looks like erel wrote it right around the time facebook was warning it was pulling the plug on webview.
 
Upvote 0

Segga

Member
Licensed User
T
have you seen this ? sounds like it would be a big change from what you're currently doing (as i understand it). it looks like erel wrote it right around the time facebook was warning it was pulling the plug on webview.
That is what I’m using.
Maybe I should move this question there?
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
probably worth a try. i would set the topic something like "facebook firebase library no longer works". erel should see it (assuming he hasn't already picked up on this thread). but, frankly, if facebook is singling out specific ways of logging in, you got a problem. i thought you were using a webview like a browser. even though facebook specifically referred to webview in its warning, i wasn't blocked. he'll be logging in in about an hour...
 
Upvote 0

Segga

Member
Licensed User
Facebook login has stopped working on the Android version of my app - iOS is still working fine.
The attached screenshot shows the pop-up that blocks the login.

I believe it may be related to Facebook's recent 'Deprecating support for FB Login authentication on Android embedded browsers'.
https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers

Just wondering if anyone else has the same issue and if there is work around for this?

Facebook re-enabled my app's Facebook login after implementing the following solution:

Check if the Facebook app is installed on the device before calling Facebook.SignIn.
Prompt the user to install the Facebook app if it is not.


Check if the Facebook app is installed on the device:
If IsAPKinstalled("com.facebook.katana") = False Then
    xui.MsgboxAsync("Please install the Facebook app to enable Facebook sign in.", "JSA OnTheGo")
Else
    facebook.SignIn
End If


Sub IsAPKinstalled(packagename As String) As Boolean
Dim PM As PackageManager   
Dim in As Intent
    in = PM.GetApplicationIntent(packagename)
    Return in.IsInitialized
End Sub

Add to manifest:
AddManifestText(<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>)
 
Upvote 0
Top