After Logout re-login, requestEmail method not giving EmailID of the user

ios
twitterkit

#1

My App is Whitelisted for getting EmailID.
On first login we are able to get user EmailID from the following method:

var twiterClient = TWTRAPIClient() 
twiterClient = TWTRAPIClient.withCurrentUser() 
twiterClient.requestEmail { (respStr, clientError)

But on logout and re-login requestEmail is not giving user EmailID.

Did someone notice this?

I really need some help about that, please.


#2

Hi, that’s a curious one. Could you share more example code to help us understand? Specifically, can you show us the full block of code you’re using the auth the user, and also the code you use to log out?

Remember that you must use the TWTRLoginMethodWebBased method when requesting email, regardless of whether it’s the initial or subsequent log in attempt. (See: https://docs.fabric.io/apple/twitter/log-in-with-twitter.html#request-user-email-address)