This piece of code used to work as expected, but now it seems i can't retrieve the user name the same way:
$uid = $facebook->getUser(); // returns the facebook id of the user
$me = $facebook->api('/me'); // returns empty. why?
Due some facebook api updates i had to change the getSession from:
$session = $facebook->getUser();
to
$session = $facebook->getUser()>0;
So how to retrieve the user name in facebook?