I followed a little 'guides online, but I can not figure out how to get the username of the user such as Facebook. The login and session work properly. But I can not just take the values โโof the current user. This is the working code
if (!appDelegate.session.isOpen) {
// create a fresh session object
appDelegate.session = [[FBSession alloc] init];
// if we don't have a cached token, a call to open here would cause UX for login to
// occur; we don't want that to happen unless the user clicks the login button, and so
// we check here to make sure we have a token before calling open
if (appDelegate.session.state == FBSessionStateCreatedTokenLoaded) {
// even though we had a cached token, we need to login to make the session usable
[appDelegate.session openWithCompletionHandler:^(FBSession *session,
FBSessionState status,
NSError *error) {
NSLog(@"SESSION FACEBOOK OK");
// how i get username ?
Thanks in advance