We are progressing! I add the following lines in build.settings:
NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, LSApplicationQueriesSchemes = { "fbauth" },
Now the message error “This app is not allowed to query for scheme…” disappeared…I receive login callback but when I try to make a request
facebook.request( "me/invitable\_friends")
I’m getting
<Warning>: FBSDKLog: Error for request to endpoint ‘me/invitable_friend’: An open FBSession must be specified for calls to this endpoint.
Next sanity check, the me/invitable_friends Graph API endpoint is only available to Facebook Apps targeting Graph API v2.0 or later.
In the dashboard for your Facebook app (on developers.facebook.com), verify that the API version is at least v2.0.
Api Version: v2.0
I have no more idea for show the player’s friend …
How could I specify an session? The request is already in login return…then I have already the session token…why its not recognized in my request? Should I pass as parameter?
I’ve tried:
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?access_token=”…token)
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
I got the token in console log but when I make the request: facebook.request( “me/invitable_friend?access_token=”…token)
I get the following error:
<Warning>: FBSDKLog: Error for request to endpoint ‘me/invitable_friend?access_token=ACCESS_TOKEN_REMOVED’: An open FBSession must be