In OAuth 2.0 with facebook, the overall concept is simple as follows.
Step 1. Obtain "Authorization Code" by a GET request
request URI: https://www.facebook.com/dialog/oauth
Params:
response_type=code
client_id={add your "App id" got by registering app}
redirect_uri={add redirect uri defined at the registration of app}
scope={add the scope needed in your app}
Headers: None
Step 2. Obtain the "Access Token" by sending the authorization code as a POST request
request URI: https://graph.facebook.com/oauth/access_token
Params:
grant_type=authorization_code
client_id=
redirect_uri=
code=
Headers:
Authorization:Basic encode with base64
Content-Type:application/json
Step 3. Use the access token got from above step and retrieve user resources