Best Way To Find a Username From a Facebook ID

Total Post:89

 1875  View(s)
Rate this:
Hi All!

I have a Facebook user's id. How do I get their username?

Specifically, I am using a FBFriendPickerController

for (id<FBGraphUser> user in self.friendPickerController.selection) {
   NSLog(@"The Facebook User: %@", user);
^This outputs stuff like the name, id, first name, last name, profile photo, but it does not give the user's username.

So, in regards to FBFriendPickerController, what is the best way to get the username of a selected user?

Your help is great appreciated. 

  1. Post:604

    Re: Best Way To Find a Username From a Facebook ID

    Hi Takeshi!

    Try as following

    You can find the username by looking at the JSON returned by
    But is there a better way of doing this, straight from the friendPickerController, that is the question.

    I hope it helpful to you.



Enter your email address here always to be updated. We promise not to spam!