I need to use the Facebook SDK in my application, but I just can not. The application has nothing, I just created a new one. It turns out that the instructions that they pass on Developers Facebook are very vague.
I need to use the Facebook SDK in my application, but I just can not. The application has nothing, I just created a new one. It turns out that the instructions that they pass on Developers Facebook are very vague.
According to the site in the /app/build.gradle
file, before the dependencies:
repositories {
mavenCentral()
}
In the dependency part of build.grad, place:
dependencies {
....
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
}
After that, you have to go to the Facebook Developers website and create an Android application. Once created, the App ID will appear in the Dashboard. The value of the App ID will be copied and in the string file a string must be created:
< string name="facebook_app_id" >(App ID)< /string >
After that, in the manifest you have to add the following line:
< meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/ >
Then just give a sync and build in Gradle and it should work.