DrkSephy / django-hackathon-starter

A boilerplate for Django web applications
1.61k stars 298 forks source link

Facebook API: How to ask for user email? #27

Closed PrincipalsOffice closed 8 years ago

PrincipalsOffice commented 8 years ago

I have spent hours trying to get the user email after login, but the response object from facebook api script would only return the user's name and id. Anyone know how? Thanks.

PrincipalsOffice commented 8 years ago

NVM, I was able to retrieve the email after I changed the request url to "https://graph.facebook.com/me?fields=id,name,email&access_token={at}".format(at=self.access_token)".