it is possible to link a PFUser with Facebook via
[PFFacebookUtils linkUser:[PFUser currentUser] permissions:@[@"email"] block:^(BOOL succeeded, NSError *error) {
if (error) {
NSLog(@"error %@", error);
// TODO smart error handling
} else {
// TODO to something
}
}];
How can I do the same with email and password.
The field "authData" should change from Anonymous to something else.
The function [PFAnonymousUtils isLinkedWithUser:[PFUser currentUser]]
should return "NO" also logged in.
This is not working:
PFUser *user = [PFUser currentUser];
user.email = email;
user.password = password;
[user saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (error) {
NSLog(@"error %@", error);
// TODO smart error handling
} else {
[PFUser logInWithUsernameInBackground:email password:password block:^(PFUser *user, NSError *error) {
if (error) {
NSLog(@"error %@", error);
}
}];
}
}];
I don't think you need to call saveInBackground on the user before logging in.
According to the parse docs:
So after setting the email and password, try calling
signUp