Start a new topic

Login social Identity iOS 10

I have an app that uses facebook to login. The function with Swift 3 changed to the code below but it simply doesn't login on Kinvey. The login works on the Facebook SDK but the function is not being called. Can someone help me?


KCSUser.login(withSocialIdentity: .socialIDFacebook, accessDictionary: [KCSUserAccessTokenKey : accessToken], withCompletionBlock: { (user, error, result) in


}



1 Comment

I installed version 3.3.0 of Kinvey SDK, and called the above methods and those aren't working.. 


User.login(authSource: .facebook, [KCSUserAccessTokenKey : accessToken]) { user, error in

                print("???????")

                if let user = user {

                    print("logou")

                    if user.value(forKey: "remainingEvents") == nil && user.value(forKey:"isPremium") == nil {

                        print("entrou no first login")

                        self.setFirstLoginUserData()

                    } else {

                        print("entrou no login sem ser primeira vez")

                    }

                } else {

                    print("failed login")

                }

            }

Login or Signup to post a comment