Consuming API from web application using OAuth 2.0

This post will guide you to get a clear understanding of OAuth 2.0 (Open Authorization) along with an example of how you can implement the OAuth flow in order to consume the facebook API from your web application. A simple introduction to OAuth2 OAuth2 allows to share limited resources between sites without exposing the user credentials. It is a secure protocol which we can use to retrieve information in a reliable manner. It provides, Federated Identity delegated Authority OAuth Grant Types - In OAuth there are four ways that client could obtain the access token. These ways are known as OAuth grant types. Authorization Code Grant Type Implicit Grant Type Password Protect Grant Type Client Credentials Grant Type Authorization Grant Flow Client sends an authorization request to the Authorization server Authorization server requests user consent from t...