Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login to Facebook is closed on Android embedded browsers #174

Open
Przemase opened this issue Oct 14, 2021 · 9 comments
Open

Login to Facebook is closed on Android embedded browsers #174

Przemase opened this issue Oct 14, 2021 · 9 comments

Comments

@Przemase
Copy link

Przemase commented Oct 14, 2021

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 [email protected] in native 6.x but I think the same problem will be on latest 3.0.7 in native 7.x

@ScottAtRedHawk
Copy link

My team and I are also affected by this issue while using this plugin...

@gerardim90
Copy link

My team is also facing the same issue. We use nativescript 6.x . Any updates on this?

@ScottAtRedHawk
Copy link

@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.

@gerardim90
Copy link

@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

@ScottAtRedHawk
Copy link

@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();

@gerardim90
Copy link

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

@ScottAtRedHawk
Copy link

@gerardim90 We're actually still using nativescript-oauth2 for iOS and @nativescript/facebook for Android if that helps?

@gerardim90
Copy link

Yep, same here... I am actually using nativescript-oauth2 for Android for doing google sign in as well, which actually works fine.

@agardes
Copy link

agardes commented Feb 15, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants