Android Facebook SDK SSO "the page you requested cannot be displayed" - android

I've been stuck on this very frustrating problem all day and through Google I've found many people with the same problem with no answers that relate to the new Facebook API for Android. I have followed the steps listed here exactly :
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
When I run the sample app on my device I get this:
When I run it on the emulator it works. I understand this to be because of Facebook's SSO implementation. The emulator does not have facebook installed so it signs in for the first time successfully, but the device launches the facebook app and for some reason gives this error and when I travel back, it is as if I am not logged into facebook at all and there is no active session (though I am because when it launches the facebook app I can browse friends, etc.)
I cannot uninstall facebook on my device and even if I could that would be unacceptable for the app users. If possible, I'd like to retain the SSO feature, but somehow make it work!
I have spent all day going back and forth with my Hash Keys, and generated them through my device+code and with the keytool and they match so the problem is not related to that. Besides, the sample app runs on the emulator which surely means its an SSO problem. Thanks in advance.

After 8 hours of scanning through my code and the facebook docs, I simply decided to update my facebook app on my tablet ( I never use it and so never bothered to update it ) and now it all works.
I guess the Facebook app on my tablet was pre-SSO of Facebook on Android, but my created app was expecting it to be supported and giving the error.

Just to be a bit more clear, if you are either running on your device or on the simulator, make sure you have the latest Facebook APK installed. Facebook changed their permissions a while ago, and you may have to manually go to the Google Play store in order to download the updated version of Facebook (it may not auto-update for you given the permission changes).

Disabling Facebook did the trick for me. It forces the app to launch the browser and surf to Facebook that way

Related

Android Facebook Share Dialog Blocks Login Due To Embedded Browser

I am using the cordova-plugin-facebook-connect plugin to launch the share dialogs from Facebook. iOS is working great, and Android is working great when the app is installed.
On Android, if the app is not installed, it tries to share with an embedded web browser. After entering my email and password, I get an error saying that logging into Facebook from an embedded browser is disabled. I am using the latest version of the plugin, which SHOULD mean the latest Facebook Android SDK
I have looked on our business dashboard and made sure that embedded login is allowed:
...but that mentions OAuth so maybe it's not relevant. I have uploaded the debug and production key hashes to the dashboard
I have found nothing on the Facebook docs and I haven't gotten an answer from the Facebook developer community.
To sum up:
If the app is installed, it is all good. Without the app, it uses the embedded browser, but Facebook is blocking the login. I would love to know WHY and how to enable it.
UPDATE: Using a Facebook generated test user worked
Cheers
As Recommended by Facebook please update Dependencies to
implementation 'com.facebook.android:facebook-android-sdk:[8,9)'
Ref :
https://developers.facebook.com/docs/android/componentsdks/
https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers/
Facebook has let everyone know that they are deprecating support for FB Login on Android embedded browsers:
https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers/
As of right now, they are blocking High Risk users with this error and will block everyone starting in August. Their suggestion is to use a later version of the SDK (8.2+) to avoid this
I can't comment (yet) so I'm creating this answer to ask you if you could try and remove all (!) local browser data, i.e. Cookies and local storage, etc. This is the first thing that came to my mind when I read "works with another login".
The issue is resolved if the user has enabled 2-factor authentication via facebook.
I have tested this with multiple real users now and for example enabling sms-2fa does enable the user to login into apps with an embedded browser. The login happens as usual if the user has the facebook app installed on the same device and already logged in on the facebook app with 2fa. Otherwise, facebook will request the 2fa when logging in but a login is possible again.
I have however found out that some apps seem to crash if they had been opened before 2fa had been activated on a phone with a facebook app and those apps need to restarted before trying to login on them again.
From this we can assume facebook blocks out embedded browsers due to their risk assessment. 2fa is specifically presented as an option to login via unsafe browsers within the security options of each user individually and sadly does not seem to be an issue on the side of who ever is using an embedded browser within their app.
This also happened to me but I've fixed it.
I just uninstalled my Facebook application and used my browser instead.
Try installing another browser, like Firefox, and set this the default browser, then login again with your Facebook credentials. It worked to me. I guess the problem is with chrome. For me, it worked when I set Firefox my default browser.
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.

Unity Facebook SDK app request not working with mobile app

I am having a problem with sending request though the Facebook mobile app.
When the FB mobile app is not install, the CUI interface came up and request can send properly.
However, when the app is install, there are pop up boxes asking for permission for request, but nothing happen after that. This only happened on Android devices. It works fine on iPhone 5.
Just wonder is this a bug that created by the mobile app, or is there anyway round this ?
Thank you very much.
May be the setting openssl is wrong.I had same problem like you.When facebook app is install,when facebook sdk call facebook API,facebook app will call our app,but Android must be set keyhash,when keyhash is wrong,it can't work.IOS do not need keyhash.So openssl must be base64.Of course,you have to copy the settings to facebook website.I have solved it like this.Hope it can help you.

How can I customize Facebook SDK 3.0 for Android?

recently I have been working on Facebook SDK 3.0 for Android.
While everything was done smoothly, I found the following issue.
When the user presses a facebook Login button on a device where native Facebook app is not installed, a webview login activity appears. After logging in, the login page appears again even when the app requests user's permissions. (This is a known issue according to Facebook http://developers.facebook.com/bugs/333926600053215)
So, until Facebook fixes this issue, what I want to do is to detect whether the user has FB app installed on his device, and if not I want to show my customized webview that handles login process.
Since I have all the source codes in Facebook library project, I think I can customize that but the question is, how should this be done?
If I make a change on one of those files in the library projects, will it be automatically applied to the main project that uses this library project? What would be an efficient way to customize the facebook library project?
I faced the same issue and partially solved it: roughly, i attempt to obtain login with publish permissions, if it's rejected then the fb application's installed and then i request read-only then publish, if it's not rejected then you get the login with publish permissions coming up right after it and you're good to go.
problems with this solution:
1) 3 user interactions instead if 2 if the fb app's installed.
2) bug if cancelling the login with a webview (a second one appears), though i think this one's solveable, i didn't have time to try.
sorry for quick/curt reply.

Corona Facebook Login

I had implemented Facebook Single Sign On in my app. Then I discovered it did not work if the user already had the fb app installed on their phone. I resolved this by generating a key hash for facebook, everything worked again. Since then I upgraded my Corona account from trial to the pro version. Now my facebook is not working again. I am still using the Android Debug key when building the apk file, and I have tried the original Hash Key which I had and made another one, but I can't get it to work. Any solutions?
Hy, we had the same.
Steps : Make a tutorial facebook login example with corona.
Try, thats will work with installed facebook app.
After implement facebook login into your app like in example.
That was the resolution for us.
But i cant say nothing exact, i got that app by another developer for some update/bugfixes.
For some reason the reason unknown to me, my Facebook Hash Key changed. I ran "adb logcat" when using my app on the device. In the logcat Facebook will tell you what Hash Key was expected. Copy/paste this into your Facebook Developer page and it works.

Android facebook sso - Invalid token

I am new to facebook sso, i have integrated the SSO into my application, this works fine in android emulator, at the same time when i do this application on device, am facing the error.. shows that invalid_token , but the same thing is working in emulator. i really don't know where the mistake is.
Even i have created the keystore and mapped with facebook apps and secret id...
Still the problem is not getting resolved...
please guide me to solve this particular issue.
Thanks in advance.
There are some problems with the SSO, the errors that are caused vary, but are probably all connected to the problem facebook is having.
It has been acknowldged by facebook as you can is in the Platform Status page.
It works in the emulator since you probably don't have the android facebook application installed on the emulator, because of that the SSO process is not the one which is used but the auth process that ships with the fb android sdk.
If the fb application is installed then the SSO kicks in and then that bug gets in the way.
There's no way to solve this for now (as far as I'm aware), the only thing is to "not using the SSO" even if it's available.
Other than that it's just waiting for facebook to solve the problem (though it has been like this for about a week or so already).

Categories

Resources