简体   繁体   中英

Parse.com can't get correct username from Parse

I am trying to implement Facebook auth with Parse SDK as described in officialy manual. But instead of real name I am getting some token when calling [PFUser currentUser]

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:YES];

    if ([PFUser currentUser] && [PFFacebookUtils isLinkedWithUser:[PFUser currentUser]]) {
        NSLog(@"USER == %@ == IS ALREADY LINKED WITH FACEBOOK", [PFUser currentUser]);
    }
}

NSLOG shows me this: USER == Op2Qz1RxiwR1zflsSzCVR538A == IS ALREADY LINKED WITH FACEBOOK

What could be the issue?

In your code you are telling it to log the entire user object. This will probably log something like a unique I'd or something.

If you want the name then you should use...

[PFUser currentUser].userName

Or some other property.

It doesnt know which part of the user to log unless you actually tell it which part you want to log.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM