Create your first Facebook application

Facebook is the most popular social platform with over 1 billion active users, because of that it makes sense to connect website with it. You can implement Facebook Like or Share, or maybe Facebook comments, whatever you do it will raise visibility of your website.

One of the boring things when I browse the Internet is that I need to register on new websites. I like when I can use oAuth and click only one button to sign-in. This way I am not loosing my time in filling registration form or by waiting email with verification link.

I will show you how you can create your first Facebook application and get Application Key and Secret, tokens, that are needed for implementing Facebook Login.

In Laravel Social and Email Authentication tutorial you can see how I implemented those tokens in new web application.

Register as Facebook Developer

First thing I need to do is to register as Facebook developer. Facebook developer section is located at http://developers.facebook.com.

Facebook Developers - Home Page

Facebook Developers - Home Page

On Developers section you have almost unlimited number of options, as you can see they offer App Monetization, Social Plugins, Messenger and other cool features.

Now I will visit My Apps link in header navigation and select Register as a Developer.

Register as Facebook Developer

Register as Facebook Developer

After this I need to accept Facebook Platform Policy.

Accept Facebook Platform Policy

Because there are many fake accounts, Facebook started asking developers for their Mobile numbers.

Mobile Phone

Adding a New Application

After phone verification is completed I am redirected to Add a New App page, there I will select Website.

Add a New App

Now I need to provide application name that my users will see when they try to sign-in.

Providing application details

With this application creation is over. Now I have my first app, but I will need to provide url of website where I plan to implement Facebook login.  So I will visit Settings tab.

Application Settings

Setting application domains and website url.

I can insert more domains for this application, this good if I am using localhost for development. I have added only one platform, website. After saving I am able to use this application on my website.

Now everything that is left is to grab Application ID and Secret, those tokens are needed for communication between my server and Facebook. When I click Show in App Secret input I will be able to see that token.

Revealing App Secret

Because now everyone knows my Application Secret I will click on Reset, to invalidate old and get new Secret.

Checkout this tutorial to see how I implemented these tokens into my web application.

Online computer science courses to jumpstart your future.
WP Engine Managed WordPress Hosting

Trending

Newsletter

Subscribe to our newsletter for good news, sent out every month.

Tags