How to import facebook sdk in android studio
The Facebook SDK for Android is the easiest way to integrate your Android app with Facebook. It enables:
Maven (Preferred Download Method)
Add this to Module-level /app/build.gradle
before dependencies
:
If you do not know the use of the code then watch the video
Add this to Module-level
/app/build.gradle
before dependencies
:If you do not know the use of the code then watch the video
repositories {
// You can also use jcenter if you prefer
mavenCentral()
}
Add the compile dependency with the latest version of the Facebook SDK in the build.gradle
file:Step 1
Copy the code to the quote you work on Android Studiodependencies {
// Facebook SDK Core only (Analytics)
compile 'com.facebook.android:facebook-core:4.+'
// Facebook Login only
compile 'com.facebook.android:facebook-login:4.+'
// Facebook Share only
compile 'com.facebook.android:facebook-share:4.+'
// Facebook Places only
compile 'com.facebook.android:facebook-places:4.+'
// Facbeook Messenger only
compile 'com.facebook.android:facebook-messenger:4.+'
// Facebook App Links only
compile 'com.facebook.android:facebook-applinks:4.+'
// Facebook Android SDK (everything)
compile 'com.facebook.android:facebook-android-sdk:4.+'
// Audience Network SDK. Only versions 4.6.0 and above are available
compile 'com.facebook.android:audience-network-sdk:4.+'
// Account Kit
compile 'com.facebook.android:account-kit-sdk:4.+'
}
// You can also use jcenter if you prefer
mavenCentral()
}
Add the compile dependency with the latest version of the Facebook SDK in the
build.gradle
file:Step 1
Copy the code to the quote you work on Android Studio
// Facebook SDK Core only (Analytics)
compile 'com.facebook.android:facebook-core:4.+'
// Facebook Login only
compile 'com.facebook.android:facebook-login:4.+'
// Facebook Share only
compile 'com.facebook.android:facebook-share:4.+'
// Facebook Places only
compile 'com.facebook.android:facebook-places:4.+'
// Facbeook Messenger only
compile 'com.facebook.android:facebook-messenger:4.+'
// Facebook App Links only
compile 'com.facebook.android:facebook-applinks:4.+'
// Facebook Android SDK (everything)
compile 'com.facebook.android:facebook-android-sdk:4.+'
// Audience Network SDK. Only versions 4.6.0 and above are available
compile 'com.facebook.android:audience-network-sdk:4.+'
// Account Kit
compile 'com.facebook.android:account-kit-sdk:4.+'
}
dependencies {
// Facebook SDK Core only (Analytics)
implementation 'com.facebook.android:facebook-core:4.+' // Facebook Login only
implementation 'com.facebook.android:facebook-login:4.+' // Facebook Share only
implementation 'com.facebook.android:facebook-share:4.+' // Facebook Places only
implementation 'com.facebook.android:facebook-places:4.+' // Facbeook Messenger only
implementation 'com.facebook.android:facebook-messenger:4.+' // Facebook App Links only
implementation 'com.facebook.android:facebook-applinks:4.+' // Facebook Android SDK (everything)
implementation 'com.facebook.android:facebook-android-sdk:4.+' // Audience Network SDK. Only versions 4.6.0 and above are available
implementation 'com.facebook.android:audience-network-sdk:4.+' // Account Kit
implementation 'com.facebook.android:account-kit-sdk:4.+'}
Android Studio Setup
How to import facebook sdk in android studio
Reviewed by Code Labe
on
April 20, 2019
Rating: