Original: However, Oliver did used to have romantic feelings towards Hannah Montana before he knew she was Miley.
Simplified: Lilly finds out that Miley is Hannah Montana in the first episode, when she breaks into Hannah's dressing room. In the second episode, Oliver's crush on Hannah Montana is shown, and because of this, Miley tells him her secret.