swift - Cannot retrieve Twitter email if authenticating using system account on iOS -


i using parseui implement facebook , twitter login in ios app.

if user has setup more 1 twitter system accounts app asks account choose when authenticating. on successful login retreiving user details twitter using call https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true

issue in above scenario, twitter api doesn't return email address. email address when system account not setup ie user logis in via web login. not want user enter email address manually.

i have whitelisted app in twitter app setting.

i tried below code. however, error :

error - optional(error domain=twtrerrordomain code=3 "this user not have email address." userinfo={nslocalizeddescription=this user not have email address.})

let client = twtrapiclient.withcurrentuser()  client.requestemail { email, error in                  if (email != nil) {                     print("email address - \(string(describing: email))");                  } else {                             print("error - \(error)")                  }         } 

is there way force parseui twitter authentication via browser skipping system account selection?

thanks ashish

go twitter app console , check mark email permission settings in following image

enter image description here


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -