I am trying to retrieve email id after fb login in my app. However I am getting an error when i try to get the value from result.
The error is:Type 'Any?' has no subscript members
.
func fetchProfile()
{
print("Fetch Profile")
let parameters = ["fields": "email, first_name, last_name, picture.type(large)"]
FBSDKGraphRequest(graphPath: "me", parameters: parameters).start { (connection, result, error) in
let email = result["email"] as? String //Type 'Any?' has no subscript members error occurs here.
}
}