0

ERROR MESSAGE:

Invalid Scopes: user_birthday, user_photos, user_gender. This message is only shown to developers

After Facebook update in their api I get invalid scope messages for user_birthday, user_photos, user_gender. I haven't submitted my app for a login review, however, as an admin of the app I shouldn't be having any errors related to permissions. What could I possibly be doing wrong?

FBSDKLoginManager().logIn(withReadPermissions: ["email", "public_profile", "user_birthday", "user_photos", "user_gender"], from: self) { (result, err) in
    print("open facebook safari")
    if (err != nil) {
       print("Fb Login Failed", err ?? "")
       self.dismiss(animated: true, completion: nil)
    }
    self.handleFirebase()
}


FBSDKGraphRequest(graphPath: "/me", parameters: ["fields": "id, name, first_name, last_name, gender, birthday, picture.width(400).height(400)"]).start(completionHandler: { (connection, result, error) in

                if let error = error {
                    print(error.localizedDescription)
                } else {

                    if let userData = result as? NSDictionary {

                        self.firstName = userData.object(forKey: "first_name") as? String

                        self.gender = userData.object(forKey: "gender") as? String

                        self.birthday = userData.object(forKey: "birthday") as? String ?? ""


                        let pictureDictionary = userData.object(forKey: "picture") as! NSDictionary
                        let pictureSubDictionary = pictureDictionary.object(forKey: "data") as! NSDictionary
                        self.userProfileUrl = pictureSubDictionary.object(forKey: "url") as! String
                    }
                }

0 Answers0