~ 1 min read

Including Facebook SDK to Android project via Gradle

It is much easier (finally, sigh) to setup Facebook SDK dependency via maven central dependency than local library dependency.

dependencies {
    compile 'com.facebook.android:facebook-android-sdk:3.23.1'
}

If you feel adventurous, you can wildcard the version number (which is in general not recommended to avoid unexpected build results)

but, it can be either one of these:

'com.facebook.android:facebook-android-sdk:3.23.+'

will pull any patch update

'com.facebook.android:facebook-android-sdk:3.2+'

will pull any minor update smaller than 30

or if you feel especially adventurous then even:

'com.facebook.android:facebook-android-sdk:3.+'

which will pull any update up to major being 4