Take the 2-minute tour ×

When trying:

facebook requestWithGraphPath:@"me/friends"

In my iOS app I get the error

"OAuthException / An active access token must be used to query information about the current user"

I can query my own Facebook data successfully usng requestWithGraphPath:@"me", and I can use the token I have to get data from


in the browser. But it won't work in the iOS app...

Can anyone help? I tried recreating a new Fb app, as I had been removing my initial test one from my approved apps and I thought that might have caused it, but the result is the same. I am requesting "offline access" in my permissions so the token shouldn't expire.

EDIT: Interestingly querying the FQL user table returns my friend list IDs

share|improve this question
what's isSessionValid function returning to you? –  Ahmed Sep 24 '11 at 7:44
add comment

1 Answer

Although This is an old post but I am answering it for the followers:

Whenever you post something with facebook graph API, You must get permissions for atleat "publish_stream" Plus be sure to post to the Wall when you receive the authorization e.g

if (![SharedFacebook isSessionValid])
     NSArray *permissions = [[NSArray alloc] initWithObjects:@"offline_access", @"publish_stream", nil];
     [SharedFacebook authorize:permissions];///Show the login dialog

     /// [self postToWall];///Do not call it here b/c the permissions are not granted yet and you are posting to the wall.
    [self postToWall];
share|improve this answer
add comment

Your Answer


