I am getting the following error even after the user allows email access
"Your application may not have access to email addresses or the user may not have an email address"
Although twitter support is saying that
"Your app has all necessary permissions to request user emails. "
and on apps.twitter.com in permissions it is said that
Can request a user's email address
my code is
TwitterAuthClient authClient = new TwitterAuthClient();
authClient.requestEmail(session, new Callback<String>() {
@Override
public void success(Result<String> result) {
// Do something with the result, which provides the email address
Log.i("email","Access granted");
Toast.makeText(LinkedInActivity.this,"Access granted",Toast.LENGTH_SHORT).show();
}
@Override
public void failure(TwitterException exception) {
// Do something on failure
Log.i("email","Access denied"+exception.getMessage());
Toast.makeText(LinkedInActivity.this,"Access denied"+exception.getMessage(),Toast.LENGTH_SHORT).show();
}
});