Innate behaviors are hardwired into the nervous system, allowing animals to produce them instinctively and without prior learning. This includes social behaviors (e.g., aggression, courtship) in most animals. If and how learning shapes such innate behaviors has not been systematically explored. Here, we investigate learning from social feedback in Drosophila. We use closed-loop optogenetics to systematically perturb the social experience of individual flies during courtship, and find that altered feedback changes the male fly\'s innate courtship strategy, opening the door for investigating the neural and molecular basis of social plasticity in flies.