I'm using facebook-android-sdk-4.19.0 in Android Studio and I followed the Facebook quick start guide at https://developers.facebook.com/docs/android/getting-started (Click on the Quick Start button to sign in with your own facebook account). In the guide, it's told to copy&paste the following code in the snippet to track app logs
import com.facebook.FacebookSdk;
import com.facebook.appevents.AppEventsLogger;
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
FacebookSdk.sdkInitialize(getApplicationContext());
AppEventsLogger.activateApp(this);
}
}
However, when I copy pasted the code in android studio, it appears that all of the FacebookSdk.sdkInitialize() methods are deprecated. The documentation here https://developers.facebook.com/docs/reference/android/current/class/FacebookSdk/ tells nothing about what method to use to initialize the sdk instead of sdkInitialize(). What method should I use?
This method can bee called manually if needed.
( github.com/facebook/facebook-android-sdk/commit/… ). So deprecation warning should be never added. Due to performance reason we do not wish to initialize Facebook SDK at app start. We just do it manually only when user need to use Facebook Login feature. – Lannielanning