1

While trying to use FacebookSDK in an iOS app, I get this message:

FBSDKLog: Error for request to endpoint ‘123654789?fields=name,supports_attribution,supports_implicit_sdk_logging,gdpv4_nux_enabled,gdpv4_nux_content': An open FBSession must be specified for calls to this endpoint

Why exactly do I get this?

I took the code from HelloFacebookSample provided with the FacebookSDK and put it into my app, but I must have missed some critical part.

Dan
  • 9,391
  • 5
  • 41
  • 73
Michel
  • 10,303
  • 17
  • 82
  • 179

2 Answers2

0

You must be using Graph API v2.0. As the sample code is from older version, it is showing this error.

In the upgraded version the "/me/friends" endpoint no longer includes the full list of a person's friends. You need to add access token to make requests. Here is the link to the changes in v2.0

You can use the recently updated iOS-howtos for reference

Pavan Kotesh
  • 143
  • 13
  • 1
    Googling FacebookSDK brought me here: https://developers.facebook.com/docs/ios (v3.16.1) I presume this is the last version of FacebookSDK. I never worried about which version of Graph API I was using. (Actually was not aware of this Graph API) But I am not sure where to start anymore. – Michel Aug 02 '14 at 03:18
  • You can use the recently updated sample code link I posted in my answer. Else you can use [This link](https://github.com/kiran5232/kFacebook) for a differenet sample code. – Pavan Kotesh Aug 04 '14 at 10:05
  • OK. I don't quite understand why this developers.facebook.com/docs/ios is not a proper source of information. But thanks for your tips anyway. – Michel Aug 06 '14 at 08:46
0

In your application's *-Info.plist change "FacebookAppID" - "123654789".

Replace the temporary ID with your application ID.

Ally
  • 2,711
  • 1
  • 16
  • 17