简体   繁体   中英

how to redirect iOS app to a specific view controller or url after successful Facebook login rather than on login page again

i am very new to iOS app with Xcode. i have made an iOS app that has a Facebook integration (Facebook login) to authenticate the user and user can only get into my app after successful login but in my case after successful login ,the control goes back to my login with Facebook page(view controller) rather than get into my app home page (view controller) so please suggest me what to do to get into my app home page after login.

for your knowledge, i am using storyboard and plain view controller files rather than navigation controller and my app is not uploaded on app store yet, it is in a development phase right now. thanks in advance.

You can use the delegate method

 - (void)loginViewFetchedUserInfo:(FBLoginView *)loginView
                                user:(id<FBGraphUser>)user {
        [self performSegueWithIdentifier:@"yourSegueToDestinationViewController" sender:self];
    }

This should achieve you the desired results. Remember to check for errors. You should not perform segue if you are not given permissions by the user.

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