Update: Facebook has disabled the lookup by username but still working with some usernames.
This is a quick example of use a serie of libraries that work great together.
I like a lot RequireJS, the way I can organize my modules/code with it. Marionette.js do a great work with the views, it takes care about everything: listeners, selectors, events, etc. And with the Facebook SDK we have a lot of info to build complex or simple applications like the next one.
The example is very straightforward:
Search for your Facebook ID or, for example: "obama" or "mickeymouse"
Take a look to the code at GitHub