iOS FBConnent login popup issue

1k Views Asked by At

I'm using FBConnect on the iOS. I tried to prevent the login popup by using: - (void)viewDidLoad {

permissions = [[NSArray arrayWithObjects:
                @"read_stream", @"offline_access", @"user_events", nil] retain];

FBtryAppDelegate *delegate = (FBtryAppDelegate*) [[UIApplication sharedApplication] delegate];

facebook = delegate.facebook;

[facebook authorize:permissions delegate:self];

}

and every time it opens the login dialog and closes itself automatically without entering the details.

I don't want the dialog appear at all if the login is already exist.

what can I do? Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

You should store the access token and the expiration date first. Then, you can check if the token is saved or not. Please, refer to this SO post.

Regards.