swift - TwitterKit not returning users email ios -
i implementing twitter login on ios application using twitter kit.
{ let loginbutton = twtrloginbutton(logincompletion: { session, error in if (session != nil) { print("signed in \(session?.username)"); self.perform(#selector(viewcontroller.requestforemail), with: nil, afterdelay: 5.0) } else { print("error: \(error?.localizeddescription)"); } }) loginbutton.center = self.view.center self.view.addsubview(loginbutton) }
i logged in successfully. when request email below code:
{ let client = twtrapiclient.withcurrentuser() client.requestemail { email, error in if (email != nil) { print("signed in \(email)"); } else { print("error: \(error?.localizeddescription)"); } }}
i error:
this user not have email address.
i enabled request email address option in twitter app setting , set privacy , policy url.
Comments
Post a Comment