0

我想添加权限以获取用户的电子邮件,我正在使用此代码

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但我不想使用登录按钮,

任何帮助,将不胜感激

4

1 回答 1

-1

下载 SDK http://developers.facebook.com/android/并阅读文档...

于 2013-07-30T11:04:09.400 回答