views:

34

answers:

0

I have an iPhone application which uses FBConnect to log the user in and also get some extended permissions. Now I need an infinite FB session key to post some info on the user's wall and I am trying to get the offline_access extended permission which seems to be not working.

FBPermissionDialog is not even showing that offline_access permission on the page which is a bit worrying. I tried this http://kokx85.blogspot.com/2010/05/iphone-extend-multiple-permission-from.html with no luck as the session key I'm getting back from the FBSession object when used in my PHP application shows "Session key invalid or no longer valid"

You can find the OBJ-C code below.

- (void)session:(FBSession*)session didLogin:(FBUID)user_id {
    self.usersession = session;
    NSLog(@"User with id %lld logged in.", user_id);

    if( !resume_session ){
        FBPermissionDialog* dialog = [[[FBPermissionDialog alloc] init] autorelease];
        dialog.delegate = self;
        dialog.permission = @"offline_access,email,user_birthday"; 
        [dialog show];
    }
    else{

        [self getFacebookName];
    }
}