Used Fabric and created app in fabric account and used that Consumer Key and secret in the app.
Later found out that to fetch email id i have to create app in apps.twitter.com as my app is still not into play store so i created an in apps.twitter.com.
Used Consumer key from apps.twitter.com and using fabric plugin it updated the new key in the app.
I am able to Login successfully but this piece of code:
authClient.requestEmail(session, new Callback<String>() {
@Override
public void success(Result<String> result) {
Log.e(TAG, "data email");
}
@Override
public void failure(TwitterException exception) {
// Do something on failure
Log.e(TAG, "Twitter Failure in email");
}
});`
On callback its going to failure method even after user clicking allow.
I enabled the checkbox to Request email addresses from users in > apps.twitter.com and regenerated consumer key and put that in the app.
Am i missing anything. Because i am getting this exception after clicking allow.
Failed to get email address.
com.twitter.sdk.android.core.TwitterApiException: HTTP request failed, Status: 400
callback.onResponse(ExecutorCallbackCall.this, response);