无法使用 Fabric 访问用户 Twitter 电子邮件地址
Unable to access user Twitter email address using Fabric
即使在用户允许电子邮件访问后我仍收到以下错误
"Your application may not have access to email addresses or the user may not have an email address"
虽然 Twitter 支持说
"Your app has all necessary permissions to request user emails. "
和 apps.twitter.com 在权限中据说
Can request a user's email address
我的密码是
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();
}
});
我已经解决了这个问题..问题是Twitter已经登录了..虽然我退出了几次但是没有用.
然后我清除了 Twitter 应用程序的缓存和数据,然后 运行 我的应用程序,现在我可以使用 fabric
从 Twitter 访问电子邮件地址
即使在用户允许电子邮件访问后我仍收到以下错误
"Your application may not have access to email addresses or the user may not have an email address"
虽然 Twitter 支持说
"Your app has all necessary permissions to request user emails. "
和 apps.twitter.com 在权限中据说
Can request a user's email address
我的密码是
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();
}
});
我已经解决了这个问题..问题是Twitter已经登录了..虽然我退出了几次但是没有用.
然后我清除了 Twitter 应用程序的缓存和数据,然后 运行 我的应用程序,现在我可以使用 fabric
从 Twitter 访问电子邮件地址