<Warning>: FBSDKLog: Error for request to endpoint 'me/invitable_friend': An open FBSession must be specified for calls to this endpoint.

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) &nbsp; &nbsp; if (event.type == "session") then &nbsp; &nbsp; &nbsp; &nbsp; if (event.phase == "login") then &nbsp; &nbsp; &nbsp; &nbsp; token = event.token &nbsp; &nbsp; &nbsp; &nbsp; print("token "..token) &nbsp;facebook.request( "me/invitable\_friend") &nbsp; &nbsp; &nbsp; &nbsp; elseif (event.type == "request") then &nbsp; &nbsp; &nbsp; &nbsp;native.showAlert("Facebook listener", "request") &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ( not event.isError ) then &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; native.showAlert("req", event.type) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- &nbsp; &nbsp;-- local response = event.response &nbsp; &nbsp; &nbsp; &nbsp; print("response "..event.response ) &nbsp; &nbsp; &nbsp; &nbsp; else&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; native.showAlert("erro", "erro") &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; &nbsp; &nbsp; end &nbsp; &nbsp; end end

facebook.login( fbAppID, facebookListener, {"user\_friends"})

Your facebook listener function needs to be defined before  you call it.

Rob

@Rob and it is…sorry…see my edit: in my code login is after facebookListener function

Hi igor-ladessa,

Based on your previous forum thread, it looks like you’re trying to use the old Facebook plugin with iOS 9 or greater. iOS 9 isn’t officially supported with the version of the Facebook SDK the old plugin uses (3.18 or 19 I think, and official iOS 9 support was added in 3.24). That being said, I’d suggest you update to the Facebook-v4 plugin, and see if this issue persists.

Following that, ensure that your app is categorized as a Game on Facebook’s Developer portal as noted here.

Last thing, you had the syntax correct before, the Graph API cal should be, me/intivable_friend s , not me/intivable_friend

Your facebook listener function needs to be defined before  you call it.

Rob

@Rob and it is…sorry…see my edit: in my code login is after facebookListener function

Hi igor-ladessa,

Based on your previous forum thread, it looks like you’re trying to use the old Facebook plugin with iOS 9 or greater. iOS 9 isn’t officially supported with the version of the Facebook SDK the old plugin uses (3.18 or 19 I think, and official iOS 9 support was added in 3.24). That being said, I’d suggest you update to the Facebook-v4 plugin, and see if this issue persists.

Following that, ensure that your app is categorized as a Game on Facebook’s Developer portal as noted here.

Last thing, you had the syntax correct before, the Graph API cal should be, me/intivable_friend s , not me/intivable_friend