Creating a Facebook Login Based App

Question

 

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

importUIKit

importFBSDKLoginKit //my Code

importFBSDKCoreKit //my Code

classViewController: UIViewController{

overridefuncviewDidLoad() {

super.viewDidLoad()

letlogInButton = FBSDKLoginButton()

view.addSubview(logInButton)

logInButton.center = view.center

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() {

super.didReceiveMemoryWarning()

// 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

 

Answer

 

Drop an email to support@helpwithassignment.com and get instant access to the solution.

Download

Comments

  • HWA
    Rasha

    this is a very good website

  • HWA
    maani

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

  • HWA
    joeanne

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

  • HWA
    joeanne

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

  • HWA
    Monik


  • HWA
    Cristina

    This solution is perfect ...thanks

  • HWA
    Janete

    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
    Sandeep

    Perfect bank of solution. 

  • HWA
    Oxana

    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
    Giuseppe

    works fine.