I am attempting to get the person’s Fb id and e mail. I will login with out error however the GraphRequest fails.
{
supervisor.logIn(permissions: ["public_profile", "email"], from: nil) { (consequence, err) in
if err != nil {
print(err!.localizedDescription)
return
}
}
logged = true
let request = GraphRequest(graphPath: "me", parameters: ["fields": "email"])
request.begin { (connection, consequence, error) in
if let error = error {
// Deal with the error
print("Error fetching e mail: (error.localizedDescription)")
} else if let userInfo = consequence as? [String: Any], let e mail = userInfo["email"] as? String {
// Efficiently retrieved the e-mail
print("Consumer e mail: (e mail)")
}
}
}
Error fetching e mail: The operation couldn’t be accomplished. (com.fb.sdk.core error 8.)