Question

I am building a small facebook application, in which I am performing the following: The user fills out his friend's names (using friend selector), What I want to do next is retrieve the friend's user ID based on their user name. Is it possible? Can I query a user by its name and receive his id?

Was it helpful?

Solution

No because names aren't unique. What you could do though is capture the UIDs that the friend is submitting, because even though it looks like names, what he's really doing is picking out UID's. Then, even without your app being approved, you can query some basic data (first, last, locale, profile url)

OTHER TIPS

That's not true! usernames ARE unique too, but the actual name isn't unique!

The username itself is the part from the url e.g.: www.facebook.com/zuck (Page from Mark Zuckerberg) his username is zuck BUT not all user have set a username. For them it shows an userid e.g.: www.facebook.com/profile.php?id=123

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top