androidreact-nativefacebook-sdk-4.0fbsdkreact-native-fbsdk

React Native Facebook SDK Next - null is not an object (evaluating 'Settings.initializeSDK')


I am trying to integrate facebook sdk into my react native app with a goal of optimizing app installs through the fb ads.

I followed all the steps mentioned here

But while trying to initialise sdk via Settings.initializeSDK() ( as mentioned in the usage section) getting the following error. null is not an object (evaluating 'Settings.initializeSDK') in the native android build.

P.S. : I am using Expo, bare workflow.

What is going wrong? Also, do we need to use Settings.initializeSDK() for fb to track app installs?


Solution

  • I was able to resolve this by deleting the android/ios folders since i was using expo. Then make changes as advised for Expo in the documentation and expo eject. The auto generated config worked out well