Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28476

React Native Facebook SDK Initialization on Android

$
0
0

I am integrating the Faecbook SDK into an existing react-native project and having the dreaded error: The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.

I have followed the instructions carefully, so strings.xml contains:

<string name="facebook_app_id">xxxxx</string>

And in AndroidManifest.xml, inside the application element, I have

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

I've made the changes to settings.gradle and build.xml as described.

All the instructions say that I shouldn't need to call FacebookSdk.sdkInitialize() if I have done the above. I'm using react-native-fbsdk version 1.1.1 and react native 0.60.5

When I followed the instructions on a simple new react-native project it works, so I am wondering if it is a conflict with something in the app, but I'm not sure what to look for. Can anyone suggest how to debug?

Thanks.


Viewing all articles
Browse latest Browse all 28476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>