O'Reilly logo

Integrating Facebook iOS SDK with Your Application by Giuseppe Macrì

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

Fetching a user's information

In this section, we are going to focus on implementing the code to show and hide a user's name and e-mail.

In the previous chapter, we created a delegate method for the FBLoginView component in the Facebook Scene to access a user's information. Hide Assistant Editor and open the LBFacebookViewController.m file. We need to add some code to the loginViewFetchedUserInfo method to customize the new labels.

Starting with customizing the name label, we can use the (id<FBGraphUser>)user input parameter provided by the method to access the user's name and set the label.

// delegate called after the application has received // the user information from Facebook platform - (void)loginViewFetchedUserInfo:(FBLoginView *)loginView ...

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