Phonegap and Facebook plugin returning status unknown - android

We need to share some information on user's profile page in Facebook using Phonegap.
To do that, we are trying with the Phonegap facebook plugin. As the phonegap app is still in development, we have created an app in Facebook as we understand that an app id is needed. We created the app and tested, but we are getting this status:
{"status":"unknown"}
with this error message:
No active session
Of course I have added the Android configuration to test in Facebook, with the Google Play Package Name and class, the hash, and tested enabling and disabling the sso. Nothing worked so far.
Any ideas?
Thanks

Related

Adding Android platform to Facebook Developer Console after building from Expo/React-Native

I have been building an app in React-Native using Expo and I am getting ready to upload beta versions for iOS and Android. I am using 'Facebook Sign in' and while developing and using the Expo Go app, I had no issues making it work. However, on Android, after making a native build, Facebook is no longer working. The authentication modal pops up, asks for the user's login info, but then it just hangs on a blank screen. No error and the modal does not dismiss. I am using the Facebook provider in the 'expo-auth-session' package for this but I think the problem lies in the Facebook Dev Console. When I try to add an android platform to my facebook account, I provide the key hash with no issue, but when I try to add my package name (as it is defined in my app.json file) I get an error saying "There was a problem verifying this package name". And if I try to press the "Confirm Ownership" button, I get another error saying "Error found while validating app-ads.txt". The problem is, I don't have my app listed on the google play store yet because I want to test it as a native build rather than inside the Expo Go app. I'm not sure if this is what is causing the Facebook sign in to not work in my native app, but I have followed all the other documentation provided by expo and this is the only issue I have run into. Is there a way to verify my app package name before submitting to the Play Store. And do I actually need to have an "app-ads.txt" file somewhere in my project? I currently do not have ads or any form of monetization in my app.

"For your account security logging into facebook from an embedded browser is disabled" cordova facebook-connect

I have been a user of cordova-plugin-facebook4 for years on my hybrid apps and of cordova-plugin-facebook-connect since the facebook4 plugin got deprecated in 2019.
Recently I have been getting reports from users that the Facebook login is failing on multiple apps of mine giving the following error "For your account security logging into Facebook from an embedded browser is disabled, you may be able to continue by updating the app you're logging in from and try again"
ScreenShot
I was able to reproduce this error by uninstalling the Facebook app from the device. and by doing some research I found the following article HERE; Which basically states that Facebook deprecated FB Login authentication on Android embedded browsers beginning of October 5, 2021. I also found this community post HERE stating that it's an ongoing issue that hasn't been fixed yet. The following is a video recording of the login process if you don't have the Facebook app installed on your device VIDEO HERE.
Conclusion; When the Facebook app is installed on a user's device the Facebook SDK triggers and the login flow is completed successfully but when the Facebook app is not installed on the user's device plugin tries to trigger a browser login and you can even see it for a second before Facebook API gives this message you see "for your account security logging into Facebook from an embedded browser is disabled". I even tried to enable Embedded Browser OAuth Login from the Facebook dashboard but that didn't change the behavior at all.
Edit: After couple more hours of investigating turns out this plugin needs androidx to work and during the build, cordova-plugin-facebook4 is installed which uses Facebook android SDK version 5.13 which doesn't support custom tabs .. so after adding the following plugins everything worked just fine.
Please close this.
plugin name="cordova-plugin-androidx"
plugin name="cordova-plugin-androidx-adapter"**
I'm posting this for those who have been facing the same issue on their apps as I didn't see a similar issue here and hoping for a fix or a workaround from the bright minds in here.
Peace.

Android - Error while trying to login with Facebook SDK

I am unable to log into the facebook SDK if the Facebook app is installed on my phone.
I succeed in logging in if I disable the Facebook app through settings. The SDK then opens a webview and it works perfectly. Unfortunately, I'm not getting any logs, so I don't have much more information than this.
If anyone has an idea of what could be happening, it would be greatly appreciated. Note that I do succeed in logging in if the app is not installed, so I don't think it's a configuration problem.
If login success in webview and not working in native installed Facebook app
So problem with your HashKeys not match with Facebook app.
The error occurs because of invalid hash key.
Generate key and change it

Phone Gap Facebook Plugin not working properly via native Facebook App and getLoginStatus() is giving Unknown Status on Android

I am using phonegap-facebook-plugin to share the feed dialog in my Ionic app. I am testing this with the test users of my app generated in Facebook developer account. This plugin is not sharing the feed via native Facebook app installed on phone. When I don't have the native Facebook app it works fine. But we want to implement this through native Facebook app.
Second when I am trying to use the method getLoginStatus() and test user is logged in Facebook app then it is giving me response "unknown". But this response should not be there as I am already logged in. For your reference https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
You need to first generate the right key hash and put it on Facebook developer account. And then if you are getting 4201 error use this -
Goto plugin.xml file of Cordova Facebook. Change the $APP_ID and $APP_name with the App Id and App name. It worked for me.

Given URL is not allowed by the Application configuration Facebook Android

I'm developing a Facebook integrated Android app. I followed this tutorial to the dot. The problem is that I get the following error if the Facebook app is not installed on the device when logging in:
Given URL is not allowed by the Application configuration
I implemented Single Sign On as specified in the tutorial. If I run my app on a device with the Facebook app already installed, my app redirects to the Facebook app to sign in. That's fine. However, if the Facebook app is not installed, I get the error. Here's a snapshot:
which redirects to Web page not available on signing in:
Edit: I double checked the tutorial and saw this bit about filling a Mobile Web URL which I didn't follow. I'm not quite sure what to enter here. Any help?
Fixed it. Seems to have been a bug on Facebook's side. Using the updated repo from github solved the problem.

Categories

Resources