I gave a bad review of my friend's book
That probably made your friend a bit upset. What did you say about it?
I just mentioned the things that I didn't like about it
If you think that the author did a bad job, or if you think that other people will not like a book, then it's fine to give it a bad review. However, you shouldn't have given a bad review to a friend when you could have told them how you felt, and helped them to fix the book before publishing it.
You're probably right, I could have just talked to them...but everyone tells me I'm right all the time, it's not fair. People tell me how to feel.
Yeah this is quite the pickle to be in. You should try to talk to them immediately to let them know because it will only be a matter of time for them to find out what you did. Hiding it might blow up your friendship.