我想添加权限以获取用户的电子邮件,我正在使用此代码
Session.openActiveSession(this, true, new Session.StatusCallback() {
@Override
public void call(Session session, SessionState state,
Exception exception) {
// TODO Auto-generated method stub
if (session.isOpened()) {
// make request to the /me API
Request.executeMeRequestAsync(session,
new Request.GraphUserCallback() {
@Override
public void onCompleted(GraphUser user,
Response response) {
if (user != null) {
et_firstName.setText(user
.getFirstName());
et_lastName.setText(user
.getLastName());
Log.e("email",
user.asMap().get("email")
+ "");
} else {
}
}
});
}
}
});
break;
我已经尝试了很多谷歌搜索,但他们都在谈论,loginbutton
但我不想使用登录按钮,