Add Facebook Login to Android App

One of the best use of your Facebook account is using it as the Login purpose on other website or Mobile App platforms. As Facebook Login provides a convenient and secure way to Login to an app or website without creating an account.Knowing the increase in the use of this Facebook features by developers, Facebook makes simple steps for integration in Mobile App using the latest version of Facebook’s SDK for Android.

In this How to Add Facebook Login to Android App tutorial, you will learn how to add Facebook login feature to your android app with few easily understandable steps.

Before you begin, make sure you have access to the following:

You need to have your developer account on Facebook and their Register Your App, you can read my tutorial to learn How to Create Facebook developer account and Register Facebook App.

Now after creating Facebook App, navigate to Settings from the left and click the Add Platform button. From the pop-up, select Android.

Facebook Login integration to Android App
Facebook Login integration to Android App

Now add your App package name and Activity name wherever it is necessary for the form. If you are yet to create app then remember this values so that whenever you create you must use this values for package name and Activity name.

How to get Key hashes ?

To get key hashes, open a terminal window and run the key tools command ( commands may differ with systems) to generate a key hash using the debug key store located at ~/.android/debug.keystore.