how do you get Facebook id form user ?

i mean with all this 2 step verification they now days demand… how do you get the Facebook id from the user,

so i’m flowing this guide: >

https://docs.coronalabs.com/guide/social/implementFacebook/index.html

i’m doing the facebook requests. 

first of all i write this > 

local json = require( "json" ) local facebookID = "" local facebookName = "" local function listener( event ) print( "event.name:" .. event.name ) --"fbconnect" print( "isError: " .. tostring( event.isError ) ) print( "didComplete: " .. tostring( event.didComplete ) ) print( "event.type:" .. event.type ) --"session", "request", or "dialog" --"session" events cover various login/logout events --"request" events handle calls to various Graph API calls --"dialog" events are standard popup boxes that can be displayed if ( "session" == event.type ) then --options are "login", "loginFailed", "loginCancelled", or "logout" if ( "login" == event.phase ) then local access\_token = event.token --code for tasks following a successful login end elseif ( "request" == event.type ) then print("facebook request") if ( not event.isError ) then local response = json.decode( event.response ) --process response data here ----HERE YOU SHOULD GET THE FACEBOOK ID \> facebookID = response.id facebookName = response.name end elseif ( "dialog" == event.type ) then print( "dialog", event.response ) --handle dialog results here end end local fbAppID = "12345678" --replace with your Facebook App ID facebook.login( fbAppID, facebookListener, { "user\_friends", "email", "public\_profile" } )

but nothing is working . i don’t get the id and the name :( 

everything in build.settings and config.lua are good

what am i doing wrong ?

how do you get facebook id and name of a person ?

facebook.request(“me”, “GET”)

When it completes your call back listener function will have an entry in it’s event table:  event.response, which will be a string of JSON with the data in it. Just

local me = json.decode(event.response)

Then me.id will be your ID, me.firstname and me.lastname should also be set.

Rob

facebook.request(“me”, “GET”)

When it completes your call back listener function will have an entry in it’s event table:  event.response, which will be a string of JSON with the data in it. Just

local me = json.decode(event.response)

Then me.id will be your ID, me.firstname and me.lastname should also be set.

Rob