How to create android app in facebook?


This example demonstrates about How to create android app in facebook We need to create Facebook App on Facebook developer site to get Facebook App ID. Please follow the following steps one by one. Go to https://developers.facebook.com/ and add new app.

Step 1  - Enter you app name and email in given fields

Step 2  – Add below line build.gradle/maven

Download the SDK from the Maven Central Repository:

buildscript { repositories { mavenCentral()}}

Compile the latest version of the SDK:

dependencies {
   implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
}

Step 3  - Add Your Development and Release Key Hashes

Generating a Development Key Hash

Mac OS:- Execute below command in terminal keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

Windows:- Execute below command in command prompt keytool -exportcert -alias androiddebugkey -keystore "C:\Users\USERNAME\.android\debug.keystore" | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" sha1 -binary | "PATH_TO_OPENSSL_LIBRARY\bin\openssl" base64

Generating a Release Key Hash

keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore YOUR_RELEASE_KEY_PATH | openssl sha1 -binary | openssl base64

Click here to download the project code.

raja
Published on 11-Sep-2019 15:10:00
Advertisements