• vikram

    why that we are using parse?

  • Marcelo Machado (Adrenalliine)

    Another great tutorial, I tried on my project and everything worked, I was reading the facebook documentation how about to get the username and cover_image? Any ideas?

    Greetings from Brazil

    • Hi Marcelo!
      I do not think user name or cover image is available via facebook api.

  • Rafael Silva

    Hey There!

    in the new version of facebook sdks says:

    Find the .plist file in the Supporting Files folder in your Xcode Project.

    1. Right-click your .plist file and choose “Open As Source Code”.

    2. Copy & Paste the XML snippet into the body of your file ( … ).

    what do i have to do? when open the plist ..there is a lot of there.Do i still have to copy and paste the facebook app id and so on plist files or i just have to copy and paste?? Please help me. tks

    CFBundleURLTypes

    CFBundleURLSchemes

    fb00000000numbers

    FacebookAppID
    1680543424421613
    FacebookDisplayName
    teste

  • Rafael Silva

    Hey There!

    in the new version of facebook sdks says:

    Find the .plist file in the Supporting Files folder in your Xcode Project.

    1. Right-click your .plist file and choose “Open As Source Code”.

    2. Copy & Paste the XML snippet into the body of your file ( … ).

    what do i have to do? when open the plist ..there is a lot of there.Do i still have to copy and paste the facebook app id and so on plist files or i just have to copy and paste?? Please help me. tks

    CFBundleURLTypes

    CFBundleURLSchemes

    fb00000000numbers

    FacebookAppID
    1680543424421613
    FacebookDisplayName
    teste

  • Omar Mahmoud El Mihilmy

    I have an issue where my User is always nil and not uploaded in Parse any help?

    • Do you mean that after

      let myUser:PFUser = PFUser.currentUser()! the value of myUser is nil?

      Do you get an error when you reference myUser object like this?:

      myUser.setObject(userFirstName!, forKey: “first_name”)

      • Martin

        I get the same error. It’s myUser that comes back nil.

        Kargopolov, you helped me a lot with your older php/mysql tutorials, hopefully you have an answer.

        Cheers!

        • Can you share your few lines on code to see how you access current user?

          • Martin

            Well, I have copied your code completely on how to log in/sign up. I dont know where to start, but below code returns user = nil.

            PFFacebookUtils.logInInBackgroundWithReadPermissions([“public_profile”,”email”], block: { (user:PFUser?, error:NSError?) -> Void in

            print(user)

            This is the first thing that gets executed upon tapping my sign in button.

            However, I am able to get token, userId, email, first and last name…and so on…

          • Martin

            Perhaps I need to do something on backend side? I have used Parse as my backend in the app where I’m now trying to implement login accordning to your tutorial. Is there anything you can think of that I need to check on my Parse account?

          • Martin

            SOLUTION!

            Sergey, I’m an idiot! My misstake was made when I copied the facebook app secret to my parse account and didn’t ‘show’ it before coping/pasting. The fb/Parse connection now seems to work and I can log in and sign up users! Something to consider when people ask you about troubles with fb/parse login? It might be easily overlooked.

            Thanks for your time and keep up the good work. I’ll come back for your tutorials in the future.

            Sincerely,
            Martin

  • Toby Applegate

    Don’t you have to define the class that you’re uploading the data to in parse? e.g.

    let object = PFObject(className: “UserData”)
    object.setObject(self.userName!, forKey: “userName”)

    // “UserData” is the class in Parse which data is uploaded to

    • Yes, if I was working with a Custom class. In my case I am working with Users class because I am referencing PFUser

  • Mayur Tolani

    Now Once I have Stored the data onto Parse, How can I retrieve the image and the name and print it on my app scree?

  • David Sanford

    Sergey, great job. very easy to follow and understand. I have one issue and I assume it is due to a newer version of Swift.

    let userId:String = result[“id”] as! String

    let userFirstName:String? = result[“first_name”] as? String

    let userLastName:String? = result[“last_name”] as? String

    let userName:String? = result[“name”] as? String

    let userEmail:String? = result[“email”] as? String

    The above code is giving me the error “Ambiguous use of subscript”. As this error is so general, I am struggling to find something online and am hoping you are still following this post.

    Thanks, Sergey
    David