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
Comments
Post a Comment