The Facebook SDK for Android consists of the following component SDKs:
If you don't need the functionality of the full Facebook SDK for Android, you can save space by using only the component SDKs that you need to support the Facebook products that you want to use in your app.
使用 Facebook SDK 时,如果您未禁用自动记录事件功能,系统会自动记录和收集应用中的部分事件。如要详细了解系统会收集哪些信息以及如何禁用自动记录事件功能,请参阅自动记录应用事件。
To link with Maven to one of the component SDKs in your project, add one of the following implementation statements to your build script:
implementation 'com.facebook.android:facebook-applinks:latest.release'implementation 'com.facebook.android:facebook-common:latest.release'implementation 'com.facebook.android:facebook-core:latest.release'implementation 'com.facebook.android:facebook-gamingservices:latest.release'implementation 'com.facebook.android:facebook-login:latest.release'implementation 'com.facebook.android:facebook-messenger:latest.release'implementation 'com.facebook.android:facebook-share:latest.release'To add an implementation statement:
buildscript { repositories {}} section to download the SDK from the Maven Central Repository:
mavenCentral()
dependencies{} section.
You can also download the entire Facebook SDK for Android.
See facebook/facebook-android-sdk on GitHub.