Facebook login has become crucial for all the sites. Keeping the user perspective in mind, it saves a lot of energy and time of the user to fill those lengthy forms for new account creation and just by login in using the Facebook account, a new user account can be created.
For the site manager it becomes very easy to fetch all the user data which is readily available on the user’s facebook account. So, this becomes a win-win situation for both the parties.
Now implementing this Facebook login for Android and iOS app is bit of a challenge for the developers. We were also facing the same issue. Thought of blogging about it to help my fellow developers overcome this challenge.
- Go to https://developers.facebook.com/
- Login using the credentials
- Go to Manage Apps > Create New App
- You'll see the Dashboard
Go to the Settings tab : Fill all the information about the app
- Display name
- App Domains
- Contact Email - Compulsory : Without this you can not make the app public
- Click On Add Platforms
- Add Website : Give the url of the domain site
- Add Android :
Fill the package name
Class name : This you will get from the Eclipse > Project > src > pacakgename.java
Open terminal and hit these following commands
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 keytool -exportcert -alias -keystore | openssl sha1 -binary | openssl base64
- Keep Single Sign On - Keep single sign key on
Now go to add platform
- Under App Restrictions keep “Social Discovery” settings on- Under Security Section
I hope this helps! Feel free to add a comment if you've any doubts :)