I am using JavaScript API to create my app for Facebook. The problem is, it\'s returning
email = undefined.
I don\'t know why? And if I use Facebo
There are a couple of things wrong with your solution. First of all you are using the old authentication scheme. You should use the new one described here : https://developers.facebook.com/docs/reference/javascript/
You need to add the oauth:true to your init function, and make sure that your getLoginStatus looks for the new type of response.
When that is said you need to make sure you have the right permissions to see the users e-mail. You can see the required permissions here: http://developers.facebook.com/docs/reference/api/user/
You get those by using the FB.login function as described by TommyBs in another answer.
Once you have those options you can use the FB.api function to get the e-mail.