使用facebook工具包获取用户电子邮件

时间:2010-05-25 20:59:03

标签: .net facebook facebook-fql

我尝试获取用户的电子邮件,我获得了权限,这是我的代码:

string email_address = "";

            var response = MainForm.stFacebookService.Api.Fql.Query(String.Format("SELECT email FROM user WHERE uid =  {0}", "1495548076"));

            XDocument xml = XDocument.Parse(response);

            XNamespace fbns = XNamespace.Get("http://api.facebook.com/1.0/");
            var users = from el in xml.Root.Elements(fbns + "user")
                        select new
                        {
                            email = el.Element(fbns + "email").Value,

                        };

            foreach (var email in users)
            {
                email_address = email.email;
            }

结果是 apps+107889662579809.1495548076.779a95208d3e074f848b0bc5e3c38926@proxymail.facebook.com

我做错了什么?

1 个答案:

答案 0 :(得分:1)

没有错,当您发送到该电子邮件时,它将重定向到用户的电子邮件。用户只是不想分享他们的真实电子邮件。