Android Facebook SDK has not been initialized error

  android, facebook, facebook-android-sdk

Many developers face this error:

The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.

Followed by official documentation we use:

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

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

But sometimes that error returns.

We tried this, of course (besides that, it’s deprecated):

FacebookSdk.sdkInitialize(context);

But sometimes that error returns.

Any answers here not working now.

Maybe someone can explain that? Maybe someone have solution? Maybe something can be done to prevent this error from occurring again? Mmm?..

Thousands of thanks for your answers or hints or reflections on this topic.

Source: Android Questions

LEAVE A COMMENT