Ok, i'll give you few hints where to start, and hopefully you'll finish this edit on your own.
Open up folder where facebook plugin is, and open runtime.js in notepad++. First we'll have to ask user for a permission to access email. Scroll to the line 232 and add this line of code:
if (fbCanPublishStream) {
perms.push("publish_stream");
// ask for email access
perms.push("email");
}
You'll have to request 'publish to stream' in C2 to get access for email in this case.
Then we'll throw the email to the log somwhere on the line 55 where you'll see this:
function onFBLogin()
{
if (!fbLoggedIn)
{
fbLoggedIn = true;
fbRuntime.trigger(cr.plugins_.Facebook.prototype.cnds.OnLogIn, fbInst);
FB.api('/me', function(response) {
fbFullName = response["name"];
fbFirstName = response["first_name"];
fbLastName = response["last_name"];
/// we'll access email here, if you want to have it as expression inside construct do it same as for first_name, or last_name. Don't forget to add an expression in edittime.js
console.log(response["email"]);
fbRuntime.trigger(cr.plugins_.Facebook.prototype.cnds.OnNameAvailable, fbInst);
});
}
};
That's about it. you have access to email. As for getting email as an expression inside C2, i left that for your enjoyment in exploring the beautiful C2 sdk. :)