Facebook Sdk Has Not Been Initialized FacebookSdk.sdkInitialize()

前端 未结 8 1322
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 23:55

Hey I know this was asked before, but none of the solutions seem to help. I\'m using first time Facebook SDK in my application.

What I\'ve tried:

I had tried

8条回答
  •  一生所求
    2020-12-05 00:19

    After checking the documentation I found that they are asking to initialize FacebookSdk in Application class onCreate() Method.

    Snap code from Facebook doc:

      public class MyApplication extends Application {
     // Updated your class body:
     @Override
     public void onCreate() {
        super.onCreate();
        // Initialize the SDK before executing any other operations,
        FacebookSdk.sdkInitialize(getApplicationContext());
        AppEventsLogger.activateApp(this);
       }
     }
    

提交回复
热议问题