You have to offer something different, and specialization is a great way to build mass. Friendster and MySpace were open to anyone from the start. It's harder to manage growth of a community in that way.
Facebook, by restricting its use to college students first, then to graduates with alumni email addresses, built a close system of people who were less wary about sharing personal details. By the time they opened to everyone, they already had a very strong user base that liked what they got out of it, but were moving into the "real world" and liked the idea of connecting with other people in their lives.
The lesson to be learned is that doing one thing and doing it well, or doing something for one small subset of people and doing it well, is a great way to develop a strong network effect. The network was built slowly but surely. The other networks took anyone and everyone and became somewhat of a mess.