Get user email using facebook toolkit

痞子三分冷 提交于 2019-12-24 10:58:52

问题


I try to get user's emails, I got extemded permissions, this is my code:

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;
            }

the result is apps+107889662579809.1495548076.779a95208d3e074f848b0bc5e3c38926@proxymail.facebook.com

what I'm doing wrong?


回答1:


Nothing is wrong, when you send to that email it will redirected to user's email. User just doesn't want to share their real email.



来源:https://stackoverflow.com/questions/2908478/get-user-email-using-facebook-toolkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!