简体   繁体   中英

iOS FBConnent login popup issue

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM