Get user email using facebook toolkit
- by Maki
Hi! 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?