FacebookSdk.sdkInitialize 在每个 activity 创建时调用或仅在 mainActivity 上调用
is FacebookSdk.sdkInitialize called on every activity created or only on the mainActivity
我需要在一个应用程序中调用多少次
FacebookSdk.sdkInitialize(getApplicationContext());
还有另一个问题有这个问题,但它没有完全回答
最初,此函数将在应用程序中调用一次 class。
但是,现在它已被弃用。
来自关于升级 SDK 的文档:
The Facebook SDK is now auto initialized on Application start. If you
are using the Facebook SDK in the main process and don't need a
callback on SDK initialization completion you can now remove calls to
FacebookSDK.sdkInitialize. If you do need a callback, you should
manually invoke the callback in your code.
参考:https://developers.facebook.com/docs/android/upgrading-4x
我需要在一个应用程序中调用多少次
FacebookSdk.sdkInitialize(getApplicationContext());
还有另一个问题有这个问题,但它没有完全回答
最初,此函数将在应用程序中调用一次 class。 但是,现在它已被弃用。
来自关于升级 SDK 的文档:
The Facebook SDK is now auto initialized on Application start. If you are using the Facebook SDK in the main process and don't need a callback on SDK initialization completion you can now remove calls to FacebookSDK.sdkInitialize. If you do need a callback, you should manually invoke the callback in your code.
参考:https://developers.facebook.com/docs/android/upgrading-4x