I used the Facebook plugin, but since it doesn't have the option to retrieve the user's email, I had to create my own code using (add javascript). It worked until I exported the game, whenever I use minify it breaks the code. Does anyone have any idea how to solve this problem? I'll leave the code I used for testing here.
FB.api('/me', { fields: 'id,name,email' }, function (response) {
if (response && !response.error) {
if (response.email && response.email !== "") {
runtime.globalVars.email = response.email;
} else {
runtime.globalVars.email = "none";
}
} else {
runtime.globalVars.email_fb = "fail";
}
});