You think buying people things makes them like you? I used to think that too. I used to think that taking care of people with materials would make them realize how much I care about them. But instead, it just makes people laugh in your face, and talk about how dumb you are behind your back, which is exactly what happened to you.
The people that are your actually friends won't care how much money you spend on them or how much you sacrifice. As long as you're an honest person, and don't use and take advantage of the people you claim to care about. This is exactly what happened to me. I gave so much of myself, and my money (which I was required to do because my parents made more income, right?) and got used and taken advantage for it, and got lied to for almost 3 years.
One day you'll take a look at yourself and realize...I took events from websites and told everyone they were a part of my life. Or, I forged all the poetry I wrote from someone else's ideas. Or I wanted cool things to happen to me, so I told everyone they did. And when asked to be proven, more lies were created, more excuses, until you started to believe them yourself. I never wanted the world's coolest friend, but someone who knew who they were.
Its taken me quite some time to find people who care about me, and who I can care about, with priorities and values I share. But its all been worth it.