---
title: "Best Way To Find a Username From a Facebook ID"  
description: "Best Way To Find a Username From a Facebook ID"  
author: "Takeshi Okada"  
published: 2013-05-20  
updated: 2013-05-20  
canonical: https://www.mindstick.com/forum/917/best-way-to-find-a-username-from-a-facebook-id  
category: "facebook api"  
tags: ["facebook api"]  
reading_time: 1 minute  

---

# Best Way To Find a Username From a Facebook ID

Hi All!\
I have a [Facebook](https://www.mindstick.com/articles/44467/successful-companies-that-utilize-facebook-as-a-social-media-platform) [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server)'s id. How do I get their [username](https://www.mindstick.com/forum/12798/there-is-no-viewdata-item-of-type-ienumerable-selectlistitem-that-has-the-key-username)?\
Specifically, I am using a FBFriendPickerController\
for (id<FBGraphUser> user in self.friendPickerController.selection) { NSLog(@"The Facebook User: %@", user);}^This outputs [stuff](https://www.mindstick.com/interview/33816/what-is-stuff-function-is-sql-server) like the [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide), id, first name, last name, [profile photo](https://answers.mindstick.com/qa/110233/how-to-exchange-twitch-profile-photo-on-iphone), 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. \

## Replies

### Reply by AVADHESH PATEL

Hi Takeshi!\
Try as following\
You can find the username by looking at the JSON returned by graph.facebook.com/(fb_id)But is there a better way of doing this, straight from the friendPickerController, that is the question.\
I hope it helpful to you.


---

Original Source: https://www.mindstick.com/forum/917/best-way-to-find-a-username-from-a-facebook-id

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
