How to generate Facebook app ID for Android?
Log into your facebook developer console.
1. Create a new app
Hover over My Apps section from the topmost horizontal menu bar to select “Add a New App”.
Enter the Display name for the application which will be displayed to the end user. Provide the respective contact email as well.
After reaching App Dashboard we need to add the Application to the Android platform.
2. Update Settings
Click “Settings” from the left horizontal menu options available in the app dashboard section and select Basic.
Select “Add platform” available at the bottom.
Select “Android” from the options shown in the dialog box.
We need to update 3 Fields:
- Google Package Name
- Class Name
- Key Hashes
Google Play Package Name
Enter your application ID you have given in your build.gradle(Module: app) file.
Class Name
Your class name is {Your application ID}.MainActivity
Key Hashes
To run the below command you need to have installed Android Studio in your machine.
To generate a key hash, open your terminal/command prompt and enter the following code:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
Enter “android” as the password.
Copy the generated key hash and paste it. Select “Save Changes”
3. After exporting the APK file
Select “App Review” from the left vertical menu options.
Toggle the control to “Yes” under Make Application Public?
Update the Key Hash:
Kindly follow this step after processing the instruction in this document.
Open your terminal and type:
keytool -exportcert -alias {alias name}-keystore {keystore path} | openssl sha1 -binary | openssl base64