How to learn to make better friends? These comments were rather entertaining and interesting to read through, that's for sure. I myself can offer very little in the way of advice, but I just wanted to say you are certainly not on your own.
I only have online friends at the moment - partly because my kind of people are always hiding behind computer screens, like I am now, and partly because it is so much easier planning what I am about to write than planning what I am about to say. For this reason I often wonder what it would be like having a robot friend - soon as I'm always basically communicating to a computer rather than an actual human face. I think I would actually find it very satisfying. As long as it was a robot that looked like Tars out of Interstellar, rather than a creepy human-looking robot.
Anyway, I have gone way off track. I would suggest involving yourself in different societies that have things in common with you - like a philosophy society at a university. As for myself, I'm just hoping that one day I'll be able to meet some interesting theoretical physics enthusiasts - which I presume I shall find... somewhere. Otherwise I'll just go with plan B and make myself a robot.