authentication - Link anonymous parse user with email and password -
it possible link pfuser facebook via
[pffacebookutils linkuser:[pfuser currentuser] permissions:@[@"email"] block:^(bool succeeded, nserror *error) { if (error) { nslog(@"error %@", error); // todo smart error handling } else { // todo } }]; how can same email , password. field "authdata" should alter anonymous else. function [pfanonymousutils islinkedwithuser:[pfuser currentuser]] should homecoming "no" logged in.
this 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 need phone call saveinbackground on user before logging in.
according parse docs:
you can convert anonymous user regular user setting username , password, calling signup, or logging in or linking service facebook or twitter.
so after setting email , password, seek calling signup
authentication login parse.com pfuser
No comments:
Post a Comment