O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating our first request

It's time to create our first request to verify that the access token we've received has worked.

Within your Friends component in index.ios.js, let's do the following things:

  • Create a method, called _getFeed, that creates a GraphRequest to your Facebook feed. This method should grab data at the /me/feed endpoint and reference a callback to be executed when that GraphRequest is complete. You can skip the optional config object that GraphRequest can optionally accept.
  • In the same _getFeed function, create a new GraphRequestManager and add the GraphRequest instance to it; then start the GraphRequestManager.
  • For the callback referenced by _getFeed, have it log either the error or the result that it receives when your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required