This question already has an answer here:

I know first one is true but I do not understand why? Can anyone explain? thanks in advance.

marked as duplicate by guidot, Hubert Schölnast, πάντα ῥεῖ, Robert, peterh Aug 24 at 1:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 10 down vote accepted

The verb "gefallen" is used with dative. You can roughly think of it as "to be pleasant to somebody":

Dieses Buch gefällt mir - this book is pleasant to me

Der Schauspieler hat ihr gefallen - the actor was pleasant to her

Hat dir der Film gefallen? - Was the film pleasant to you?

Not the answer you're looking for? Browse other questions tagged or ask your own question.