I've lost friends online and been had by individuals as well.
Both are very different kinds of pain. I am sorry to hear you got stuck like that, but really the best thing to do is let it go. Don't let it make you bitter or jade you too much, because not everyone is like that. You can still make some very good friends online.
I've been online since 1986 and made a few very good friends and still keep in touch. Admittedly, I've made more acquaintances and lost touch with them, but they none-the-less enriched my life for a time and I don't regret knowing them.
And I've met some real stinkers before too, people who use and abuse one's trust. I am more cautious then I used to be, but I still try to give people the benefit of the doubt. I've been had a few times though. It always sucks when you get played and its okay to kick yourself for awhile, but don't dwell on it. Everyone can get fooled, especially on the internet. Most people don't do it maliciously, they are just thoughtless or get carried away and back themselves into a corner on how to get out of it and save face.
It's the ones that do it for kicks and thrills that really get you. All you can do is let go and move on. Really, they are obviously miserable and troubled enough, they aren't going to care about the emotion and thought you waste on them. It's best to just laugh at them and forget them and remember for the future to not take things at face value.