Open Przemase opened 2 years ago
My team and I are also affected by this issue while using this plugin...
My team is also facing the same issue. We use nativescript 6.x . Any updates on this?
@gerardim90 My team switched to https://github.com/NativeScript/plugins/tree/main/packages/facebook. We used conditional imports (or require(...) would work too) in code to target Android only for now.
@ScottAtRedHawk , I tried installing that plugin and doing LoginManager.init(); in main.ts and using it on my login component. But I started getting JS: Facebook login error: Error: The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first. Did you do anything extra other than what the usage section mentions here https://github.com/NativeScript/plugins/tree/main/packages/facebook . Thank you so much for your help
@gerardim90 Did you call the code below somewhere in your app.js or app.ts? And follow the directions for setting up the native stuff on Android and iOS?
import { LoginManager } from '@nativescript/facebook';
LoginManager.init();
Yes, I put that code in my main.ts and I already had the native stuff setup when I first set it up for using this plugin and it was working fine until the android webview deprecation broke it
@gerardim90 We're actually still using nativescript-oauth2 for iOS and @nativescript/facebook for Android if that helps?
Yep, same here... I am actually using nativescript-oauth2 for Android for doing google sign in as well, which actually works fine.
@gerardim90
I tried installing that plugin and doing LoginManager.init(); in main.ts and using it on my login component. But I started getting JS: Facebook login error: Error: The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first. Did you do anything extra other than what the usage section mentions here https://github.com/NativeScript/plugins/tree/main/packages/facebook . Thank you so much for your help
I had the same problem and found out that I put the meta data inside <application> <activity>
instead of putting it just inside <application>
(so before the <activity>
tag).
<application>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
<activity> </activity>
</application>
It fixed it for me
FB Login authentication is deprecated and close by FB on Android embedded browsers.
Updated on August 27, 2021: We will continue to support FB Login authentication on Android embedded browsers until October 5, 2021. Based on developer feedback, we are providing additional time for developers to plan for the deprecation of FB Login authentication on Android embedded browsers. Also note that the Passwordless flow referenced below is no longer an available option for developers. Please review the detailed documentation here.
https://developers.facebook.com/blog/post/2021/06/28/deprecating-support-fb-login-authentication-android-embedded-browsers/
I'm using nativescript-oauth2@2.4.4 in native 6.x but I think the same problem will be on latest 3.0.7 in native 7.x