views:

321

answers:

1

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?

+1  A: 

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.

Xuki
but when I send email on this address it's not working, how I can contact users via email from my application?
Maki
http://wiki.developers.facebook.com/index.php/Proxied_EmailTry notifications.sendEmail?
Xuki
It's working, thanks a lot
Maki