Creating a Facebook Login Based App



Create a Facebook login based app.
App should have 3, not necesary, view controllers.
1- welcome screen with a button to connect using facebook.
2- the facebook button and a button to go back to the main page.
3- theviewcontroller that will show up as the login went successful.

How can redirect the user to another window after login went ok?

This the code in the viewController.swift file


importFBSDKLoginKit //my Code

importFBSDKCoreKit //my Code

classViewController: UIViewController{

overridefuncviewDidLoad() {


letlogInButton = FBSDKLoginButton()

view.addSubview(logInButton) =

if (FBSDKAccessToken.current() != nil) {

// User is already logged in, do work such as go to next view controller.

// I need help here. How to send the user to another window.



overridefuncdidReceiveMemoryWarning() {


// Dispose of any resources that can be recreated.



Everything works like it should, I just help redirecting the user to "Show after successful login" after login with Facebook happens
Right now it only shows the Facebook logout button and stays in the same page...

Show transcribed image text




Drop an email to and get instant access to the solution.



  • HWA

    this is a very good website

  • HWA

    I have 50 questions for the same test your page is showing only 28

  • HWA

    hi can you please help or guide me to answer my assignments. thanks

  • HWA

    hi can anyone help or guide me to my assignments. thanks

  • HWA

  • HWA

    This solution is perfect ...thanks

  • HWA

    Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes

  • HWA

    Perfect bank of solution. 

  • HWA

    great !

  • HWA
    Paul Brandon-Fritzius

    thanks for the quick response. the solution looks good. :)

  • HWA
    tina Johnson

    thnx for the answer. it was perfect. just the way i wanted it. 

  • HWA

    works fine.