Problem integrating Firebase with Nativescript

0

Good afternoon.

I'm starting a project with Nativescript and I just started playing it. I want to integrate it with Firebase and I get an error. The application is built correctly but when I go to initialize it I get an error screen and it does not let me do anything. The last thing I have done is install the plugin and import it into my app.module.ts as follows:  import firebase = require ('nativescript-plugin-firebase');

As I said, this works well for me, but when the app is initialized from my phone I get a screen with an error that says: Error: A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk .setApplicationId before initializing the sdk.

Among other things, but this is the error that tells me. I have attached a photo to make it look better. What I do not understand is what he tells me about Facebook, since I have not added anything from Facebook, simply the Firebase plugin. I do not know if I'm missing something, because I'm just starting to touch Nativescipt .. I hope someone can help me solve it since I just started and I'm already stuck ..

Thank you very much in advance !!

Carlos

    
asked by Carlos 06.04.2017 в 19:51
source

2 answers

0
  • Verify that you have correctly added your app to the firebase console (the id above all) and that you have active Facebook authentication from the console.

For me it was solved with doing tns platform remove android / ios and running again

    
answered by 21.09.2017 в 16:43
0

After reviewing I noticed that it could be for this reason. Verify that you have both steps of the documentation:

  • Add to AndroidManifest (app / App_Resources / Android) within the Application tag

    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
    
  • Create a "facebooklogin.xml" file within "app / App_Resources / Android / values" that contains:

    <?xml version='1.0' encoding='utf-8'?>
    <resources>
    <string name="facebook_app_id">tufacebookid</string>
    </resources>
    
  • answered by 22.09.2017 в 06:33