iOS app Facebook login Swift 4 Xcode 9 FBSDK integration Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 มี.ค. 2018
  • iOS app login with Facebook
    Facebook SDK integration Tutorial
    Cocoapods Tutorial
    Xcode new project setup
    Provide Facebook login feature in your iOS app
    Facebook login in iPad app
    Add Facebook to iOS app
    Facebook login dashboard
    developers.facebook.com
    WorkFlow
    1- Create new Xcode project
    2- Create pod file, add pods for Facebook and install
    3- Add login with Facebook button, login and logout methods
    4- Configure plist, configure AppDelegate,
    5- Run the application on simulator and Test
    6- Save email and other credentials achieved from Facebook login
    Xcode Project on GitHub coming soon.
    cheers

ความคิดเห็น • 41

  • @comingfu8086
    @comingfu8086 2 ปีที่แล้ว

    Very detailed, perfect for beginners like me. If I have problems in setting up FB and Firebase SDK, may I ask you?

  • @hafeezshaik4935
    @hafeezshaik4935 5 ปีที่แล้ว

    nice videos man

  • @zacharykline9575
    @zacharykline9575 6 ปีที่แล้ว

    Facebook says, "Your app should not pre-fill content to be shared. This is inconsistent with Facebook Platform Policy, see Facebook Platform Policy, 2.3". Does that you mean you cannot allow the user share stuff with information already in the composer like in your recent Twitterkit iOS 11 video??

  • @playalongkeys8857
    @playalongkeys8857 5 ปีที่แล้ว

    Nice video. Would be good to show images of user and at least names of user friends, though I understand that with the change in FB rules, the user friends would only include those using this app, which I guess would be none.

  • @ahmadhammouz409
    @ahmadhammouz409 6 ปีที่แล้ว

    Thank you for the tutorial. You've changed my life for sure!!!
    I'm wondering how can I control the view after the log in - can I connect the code to my Main Storyboard? I need this in order to authenticate the log in for the user to my app, and then the user would be able to access their profile for the app throug the Fb log in.

    • @pluspakistan7343
      @pluspakistan7343  6 ปีที่แล้ว

      Yes, you can connect to this to your storyboard. Do this code in your App login screen, get permission for gender, public_profile_pic and few more permissions and that should do the job.

  • @exactspace
    @exactspace 6 ปีที่แล้ว +1

    Are the pods necessary if you downloaded the framework (CoreKit, LoginKit, and Sharekit) and dragged them to your project?

    • @pluspakistan7343
      @pluspakistan7343  6 ปีที่แล้ว +1

      exactspace Not necessary, you can use the manual method “drag drop”. Pods are only recommendation.

    • @exactspace
      @exactspace 6 ปีที่แล้ว +1

      Thank you. This helped me out a lot, especially the button and requesting certain permissions.

    • @aryjonathan90
      @aryjonathan90 6 ปีที่แล้ว

      I successfully made this project without pods(dragged and dropped the frameworks), but when I try to log in, the simulator says: "Safari cannot open the page, because it could not establish a secure connection to the server" - Maybe you have some idea what went wrong...

    • @pluspakistan7343
      @pluspakistan7343  6 ปีที่แล้ว

      I believe its related to some antivirus on your mac machine, not sure though.

    • @aryjonathan90
      @aryjonathan90 6 ปีที่แล้ว +1

      Just found a solution! Thank you so much! It's the Avast WebShield. :)

  • @jhectorus6162
    @jhectorus6162 5 ปีที่แล้ว

    if you cancel the operation, what happens?

  • @sokelilung4520
    @sokelilung4520 5 ปีที่แล้ว

    Please show how to get access to friends list and how to display that list in UITableview

  • @shaunz383
    @shaunz383 5 ปีที่แล้ว

    Getting an error when I click the login button. Followed your instructions up to 19:04

  • @alexpolymath
    @alexpolymath 5 ปีที่แล้ว

    Use of undeclared type 'UIApplicationOpenURLOptionKey'

  • @divaskar6920
    @divaskar6920 5 ปีที่แล้ว

    getting more sound in head set while click the mouse. so, please slowly click the mouse.

  • @haniyakhan1463
    @haniyakhan1463 6 ปีที่แล้ว

    Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value ( not logged in, from access token), how to solve this issue

    • @pluspakistan7343
      @pluspakistan7343  6 ปีที่แล้ว

      Not sure what are you stuck with, without looking at your code can't really help you.

  • @nourmiled731
    @nourmiled731 5 ปีที่แล้ว

    thanks for this tutorial
    But when i open the terminal and i write this line (open -a xcode podfile ) this file does not existe what should i do ?

    • @nourmiled731
      @nourmiled731 5 ปีที่แล้ว

      i figure out the problem but i have another one :
      that in minute 6.45 when u run to check if the project.xcworkspace its building successfully i found a erreur plz can u help

  • @sonamkumari-co7kl
    @sonamkumari-co7kl 6 ปีที่แล้ว

    sir any video for gmail sign in ??

    • @pluspakistan7343
      @pluspakistan7343  6 ปีที่แล้ว

      sonam kumari i will make one soon and let you know.
      Thanks

  • @premkumarsepuri3556
    @premkumarsepuri3556 5 ปีที่แล้ว +1

    getting this error canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" im using xcode 10.1 and swift 4.2

    • @tiberiu-andreiureche7236
      @tiberiu-andreiureche7236 5 ปีที่แล้ว

      getting the same error when the connect with facebook button is pressed. nothing happens then....

    • @premkumarsepuri3556
      @premkumarsepuri3556 5 ปีที่แล้ว

      @@tiberiu-andreiureche7236pod 'FacebookCore' #(0.5.0)
      pod 'FacebookLogin' #(0.5.0)
      pod 'FBSDKCoreKit', '~> 4.38.0'
      pod 'FBSDKLoginKit', '~> 4.38.0'

    • @premkumarsepuri3556
      @premkumarsepuri3556 5 ปีที่แล้ว

      github.com/facebook/facebook-swift-sdk/issues/301 for reference please go to above link . And replace exisiting pod names with above pod names . New pods have few bug's

    • @tiberiu-andreiureche7236
      @tiberiu-andreiureche7236 5 ปีที่แล้ว

      @@premkumarsepuri3556 getting this error when trying to downgrade.
      imgur.com/a/JVpTvXh

    • @premkumarsepuri3556
      @premkumarsepuri3556 5 ปีที่แล้ว

      @@tiberiu-andreiureche7236 i tryed in new project they are working
      pod 'FacebookCore' #(0.5.0)
      pod 'FacebookLogin' #(0.5.0)
      pod 'FBSDKCoreKit', '~> 4.38.0'
      pod 'FBSDKLoginKit', '~> 4.38.0'
      try in fresh project make sure your using xcode 10.1 and swift 4.2 and updated cocoapods

  • @harjeetsingh4237
    @harjeetsingh4237 6 ปีที่แล้ว

    how we can access user name, email etc

    • @pluspakistan7343
      @pluspakistan7343  6 ปีที่แล้ว

      Check permissions section of the FBSDK, add "email" in permissions.

  • @sudarshanderangula6563
    @sudarshanderangula6563 6 ปีที่แล้ว

    Am getting Errors when i am doing this ...

    • @pluspakistan7343
      @pluspakistan7343  6 ปีที่แล้ว

      Details?

    • @sudarshanderangula6563
      @sudarshanderangula6563 6 ปีที่แล้ว

      Here am getting problem
      if FBSDKAccessToken.current() ! = nil {
      self.labelStatus.text = "Logged In"
      }else {
      self.labelStatus.text = "Not Logged In"
      }

    • @sudarshanderangula6563
      @sudarshanderangula6563 6 ปีที่แล้ว

      I resolved the problem at above code but .getting problem in simulator that showing Invalid Scope:public

  • @shaunz383
    @shaunz383 5 ปีที่แล้ว

    Getting an error when I click the login button. Followed your instructions up to 19:04

    • @shimadaryabari5663
      @shimadaryabari5663 5 ปีที่แล้ว

      it is because of the latest version of sdk you have to downgrade your pod to pod 'FBSDKCoreKit', '4.36.0'
      pod 'FBSDKLoginKit', '4.36.0'
      pod 'FacebookCore', '0.4'
      pod 'FacebookLogin', '0.4'