Skip to main content

Registering Client App in Facebooke - OAuth

Registering App with Facebook

To register app in Facebook follow the link and create a new app. https://developers.facebook.com/

Once we created the app you can see the app details in the dashboard and the screen that looks something like this.



Here we can notice the Appid and Appsecret for the created Facebook app. [Client ID & Client Secret]

When registering a client app to configure with OAuth we have need to consider 5 main parts, such as client ID, client secret, redirection endpoint, authorization endpoint and token endpoint.
The "key" (that is, access token) is passed back via the redirection endpoint in step 4 Redirection endpoint:

It is a very important property in the client application. This helps the service providers to call back the application and to pass control back to your application and even send you important information.[tokens/error messages]

In OAuth authorization process [1st step] users need to login to the service provider’s authorization endpoint and authorize the client application [user consent page]. After user completed this process controls must be handed to the client application. This done via redirection endpoint.
 
We can give one/many redirection endpoint(s) to the app we are creating [Settings->Basic].
After set our redirection endpoint we have to find the service providers authorization endpoint as well as token endpoint. For Facebook, it built those properties in a library file and encourage us to use that SDK file [this SDK file interact with Facebook OAuth service]. Anyway the authorization and token endpoints of Facebook are:

Authorization endpoint -> https://www.facebook.com/dialog/oauth

Token endpoint -> https://graph.facebook.com/oauth/access_token

Now you are having all the necessary properties.
Client ID 2032416086987946
Client Secret 1fd424a4b9dac1b9c8b28974cd0b87e6 [sample secret ID]
Redirection endpoint http://localhost:8080/my-web-app-2/callback.html
Authorization endpoint https://www.facebook.com/dialog/oauth
Token endpoint https://graph.facebook.com/oauth/access_token
Let’s build our application !!!

Comments

Popular posts from this blog

What is Google Hacking?

As an ethical hacker we have need to follow some general steps to be a good ethical hacker. Such that steps/stages can be listed as follows. But these steps are not a defined one. We can change them according to our needs. 1    . Reconnaissance – Gathering the information which are having the security vulnerability. 2   . Scanning - Examine/explore a target machine/network for the vulnerability that can be make use to go inside. 3    .Gaining Access – After scanning process make use of the vulnerability and attempt to move inside to the system to exploit. 4    . Maintaining Access – After moved into the machine/network hacker needs to make some backdoor to gain the access again. 5    . Clearing Tracks (unethical) – Clearing the traces of all the activities what they done in their hacking process. 6    . Reporting – End of the ethical hacking process in order to make some notes on the findings, things done in the hacking...

Hack Windows 2000 by Kali Linux through the Metasploit Framwork

It is a sample documentations to record what I have did to hack Windows 2000 by Kali Linux. ©IT Today

1st Program in Maven @ Ubuntu

Maven What is Maven? It is a Build tool – building a code in a development environment Project management tool – it helps to generate reports, helps in the dependency management, etc. Maven as a Build tool. Why we are using Maven? To reduce the common problems and activities which are needed, when we are developing applications. 1. Multiple jars – Program may contain one/many frameworks and frameworks are need to include it all the required “jar”. “jar” are need to available in compile time, need to bundle them in the distribution. (We can miss something/ we don’t know what is jar?) 2. Dependencies and versions – a jar can depend on another jar, so we have need to make sure that all my dependencies are closed and make sure that I have supplied all the dependencies. Dependencies could differ bases on the versions. 3. Project structure – Proper structure for the application. (E.g. Directories, libraries , etc.) 4. Building, publis...