is it really my fault?

Last week my boyfriend and I were having sex and after we were done, I found out that he lied about it and he came in me. I complained to my friends about it and they told me that I should have made sure he wore a condom, and that I should have been in birth control pills if I didn't want this to happen, they were blaming me for that! I have just been sad about the whole thing and I don't know what to do.