They say; "To have a friend, you've got to be a friend." This speaks to giving of yourself rather than expecting another to give to you first. I get that. For much of my life, I've tried to get beyond my own hang-ups and insecurities, in order to cultivate real relationships. It feels somewhat risky in the moment, but for the most part, I've found this to be true. It often works out.
However; I'm not hesitant to say this may not always be the case. There are people in this world who behave as though they want to be your friend, but then something unknown happens to bring the whole "friends" thing to a hault. It's a shame, but sometimes that's what happens. Some folks just don't have the courage to tell you if you inadvertantly insulted, angered, or put them off for any number of reasons. They just don't have it within themselves to do so.
What to do... What to do...? I think developing a well balanced view of "self" is probably the answer. Valuing yourself as much (possibly more?) as you do others. Not placing yourself above them, or feeling superior, but realizing that if you're everyone's friend, there's a good chance you're selling yourself short (or even "out"!). Thus sayeth the crazed philosopher