thebergamo / react-native-fbsdk-next

MIT License
692 stars 166 forks source link

Error: missing appID in the plugin properties #549

Closed AkshayKrJha closed 2 months ago

AkshayKrJha commented 2 months ago

🐛 Bug Report

I am trying to integrate facebook login with firebase, into expo app for android only. I followed all the facebook sdk setup, its integration with firebase, and putting the dependencies in android as mentioned here and here. On trying to build, throws error:

PROJECT_DIR/node_modules/react-native-fbsdk-next/plugin/build/withFacebook.js:13
        throw new Error('missing appID in the plugin properties');

To Reproduce

Put details in app.json

"plugins": [
      "expo-router",
      "react-native-fbsdk-next",
      {
        "appID": "367xxxxxxxxxxxxx",
        "clientToken": "ccxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "displayName": "SomeName",
        "scheme": "fb367xxxxxxxxxxxx"
      }
    ],

In android/app/build.gradle in dependencies implementation 'com.facebook.android:facebook-android-sdk:[8,9)'

In AndroidManifest.xml under application

<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

In strings.xml

  `<string name="facebook_app_id">367xxxxxxxxxxxxxxx</string>`

and login code from here

Expected Behavior

App should build successfully

Code Example

Code from here

Environment

Expo SDK 51.0.28 react-native 0.74.5

AkshayKrJha commented 2 months ago

Closing this, as issue resolved. Required minor change in app.json file (required fbsdk-next, and its object to be wrapped up in an array). Now login working fine.