We are using the Fabric Twitter Plugin.
We are initialising Fabric in our app as follows:
TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
Fabric.with(this,new Twitter(authConfig), new Crashlytics());
Upon signup, we provide the user with the option to signin using twitter.
We have requested and have been granted the email permissions for our app,
however we can not receive the email and continue to receive the error “com.twitter.sdk.android.core.TwitterException: Your application may not have access to email addresses or the user may not have an email address”
The code we are using to attempt to receive the users email address:
twitterAuthClient.authorize(this, new com.twitter.sdk.android.core.Callback<TwitterSession>() {
@Override
public void success(Result<TwitterSession> twitterSessionResult) {
twitterAuthClient.requestEmail(twitterSessionResult.data, new Callback<String>() {
@Override
public void success(Result<String> result) {
String userEmail = result.data;
@Override
public void failure(TwitterException exception) {
ProgressBarUtil.dismissProgressDialog();
Log.i(TAG, "TWITTER requestEmail FAILURE : "+exception.toString());
}
});
}
@Override
public void failure(TwitterException e) {
ProgressBarUtil.dismissProgressDialog();
e.printStackTrace();
Log.d("TwitterKit", "Login with Twitter failure", e);
MainUtils.showAlertDialogPlain(SignInPage.this, "ERROR: ", e.toString());
}
});