Hi,
How would you go about getting the First Name from the Facebook profile using the http.request “GET” method.
I got the following from Defold’s Facebook API documentation:
local function get_name_callback(self, id, response)
-- do something with the response
end
function init(self)
-- assuming we are already logged in.
local token = facebook.access_token()
if token then
local url = "https://graph.facebook.com/me/?access_token=".. token
http.request(url, "GET", get_name_callback)
end
end
But how would you use the get_name_callback to get the First Name?