1

我在developer.facebook 2.4 版注册的示例项目和请求的权限是 *

电子邮件,生日,性别

*

默认.aspx

        string code = Request.QueryString["code"];
        if (!string.IsNullOrEmpty(code))
        {
           // dynamic info = fb.Get("me?birthday");
            string data = FaceBookConnect.Fetch(code, "me");
            FaceBookUser faceBookUser = new JavaScriptSerializer().Deserialize<FaceBookUser>(data);
            faceBookUser.PictureUrl = string.Format("https://graph.facebook.com/{0}/picture", faceBookUser.Id);
            pnlFaceBookUser.Visible = true;
            lblId.Text = faceBookUser.Id;
            lblUserName.Text = faceBookUser.UserName;
           lblName.Text = faceBookUser.Name;
            lblEmail.Text = faceBookUser.Email;
            lblbirthday.Text = faceBookUser.birthday;
            lblf_name.Text =faceBookUser.first_name;
            lblgender.Text = faceBookUser.gender;
           ProfileImage.ImageUrl = faceBookUser.PictureUrl;
            btnLogin.Enabled = false;
        }
4

0 回答 0