Search code examples
iosfacebookfacebook-graph-apifacebook-ios-sdk

Facebook Graph API v1.0 token iOS SDK


I have a registered Facebook application that uses FB Graph API in version 1. It has permissions for the following things:

  • email
  • public_profile
  • user_friends

I use it's API key in my iOS application to allow users log in.

I read user token as [[session accessTokenData] accessToken]];

However when I use this token in FB graph explorer I cannot get a list of friends.

The only message I receive are friends that uses this app too so the same when I use api v2.0.

How to get token that allows me to use FB Graph API in version 1?


Solution

  • We solved that by enabling v1 API compatibility by:

    [FBSettings enablePlatformCompatibility: YES];
    

    Docs: https://developers.facebook.com/docs/reference/ios/current/class/FBSettings/