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();
}
});
I have solved this issue ..the issue is that the Twitter was already logon ..Although I have sign out several times but didn't worked .
Then i clear the cache and data of twitter app then run my app and now I am able to access the email address from twitter using fabric
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.