Set Up Project and Fetch Client Credentials

Learn to create a developer app on Facebook Developers Dashboard and fetch the authorization credentials.

Facebook Login manages the OAuth 2.0 flow for Facebook. It allows third-party applications to access Facebook resources of the users using Facebook APIs. This lesson goes over the steps needed to set up OAuth 2.0 with Facebook in your applications.

To get a better idea of the process, let's say you've built an application that fetches user- uploaded images from Facebook and allows the user to view these images. The OAuth entities in this case will be as follows:

  • Client: Your application that fetches images from Facebook.

  • Resource owner: The user who wants to use your application to see the images. You'll be accessing your own resources through the client, so you are the resource owner in this case.

  • Authorization server: Facebook's authorization server

  • Resource server: Facebook's resource server.

To get started, you need to register the client on Facebook by creating a developer app on Facebook and generating your OAuth credentials. Let's go over the complete process to create a project and get the required credentials.

Register as a Facebook developer

To use Facebook APIs, you first need to register yourself as a developer on Facebook. Follow the steps below to do so:

  1. Create an account on Facebook if you don't have one already.

  2. Go to the "Meta for Developers" page, and log in if required.

  3. Once you land on the "Meta for Developers" page, click the "Get Started" button on the top right side of the page. You're redirected to a page where you're asked to confirm some information.

  4. Click the "Continue" button after going through the Facebook Platform Terms and Developer Policies. You're taken to the "Contact info" window.

  5. Click the "Confirm Email" button. You're redirected to the last confirmation window.

  6. Select "Developer," and click the "Complete Registration" button to complete your registration as a developer on Facebook.

Get hands-on with 1200+ tech skills courses.