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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -