Let's build it!
Now that we know more about access tokens, and the various ways to pass them along to the service provider during an API call, let's incorporate this into our application! Currently, we have two versions of our sample application: the client-side example and the server-side example. We will make API calls in both versions of the application, and we will look at utilizing all three methods of passing the access token. Let's begin!
Note
The Facebook Graph API
For our sample application, we will be making API calls to Facebook's Graph API. This is the API that Facebook offers developers who want to integrate with their services. Protected and accessed using OAuth 2.0, this makes for an ideal setting to demonstrate our usage of the protocol. Find more information on the Facebook Graph API at https://developers.facebook.com/docs.
In our client-side application
In Chapter 5, Get an Access Token with the Client-Side Flow, we built an HTML/JS webpage capable of requesting an access...