Hello there,
I would greatly appreciate it if someone can help me with this issue. I am having trouble grabbing the user’s email from facebook. Here’s my code below –
local function facebookListener(event) if (event.type == "session") then if (event.phase == "login") then sessionToken = event.token facebook.request("me", "GET", {fields = "email"}) end elseif (event.type == "request") then local response = event.response native.showAlert("My Response", response) end end facebook.login( fbAppID, facebookListener, {"publish\_actions, email"})
I’m not sure what’s wrong and I’ve searched and couldn’t find anything regarding Facebook user’s email. Am I suppose to insert the session token into the request somewhere?
Thank you.