I’m trying to get invitable_friends. I can login sucessfully and get a token, but when I make a request I’m getting:
<Warning>: FBSDKLog: Error for request to endpoint ‘me/invitable_friend’: An open FBSession must be specified for calls to this endpoint.
local function facebookListener(event) if (event.type == "session") then if (event.phase == "login") then token = event.token print("token "..token) facebook.request( "me/invitable\_friend") elseif (event.type == "request") then native.showAlert("Facebook listener", "request") if ( not event.isError ) then native.showAlert("req", event.type) -- -- local response = event.response print("response "..event.response ) else native.showAlert("erro", "erro") end end end end
facebook.login( fbAppID, facebookListener, {"user\_friends"})