Access the Owner's Resources

Take a look at how we can access the resources of Facebook users with the help of access tokens.

Let's look at a React application that uses some endpoints of Facebook's Graph API. Using this API, we'll access Facebook user resources. Our Facebook developer app has not been published yet, so we can use the Facebook Graph API to access only our own or the test usersThe simulated accounts we can create in the developer app.' private resources. The access token retrieved in the previous lesson helps validate our requests, allowing us to access these resources.

Application workflow

Let's look at the application workflow from the user's perspective:

  • When the application starts, we are presented with the home page. This page contains some basic user information retrieved from Facebook.

  • If we click the "See Images" button on the home page, we're redirected to another page that contains the photos uploaded by the user on Facebook.

Demo application

The widget below contains the code for our application. Click the "Run" button to see the application in action.

Get hands-on with 1200+ tech skills courses.