I don't know that this is as much about language as it is about WHAT you are doing. I think you need to find a FRAMEWORK that supports your efforts. For social networking, you may want to check out ELGG or Dolphin (the one by Boonex). While I believe both of these happen to be PHP, you want something that has a lot of the social tools ready to go and then make it yours via customization. Both of these platforms are designed for Social...and there are surely others out there, but you'll be way ahead of the game starting with either.
Before you ask "How" you need to successfully answer "Why": Why do you want to build one? Who's going to use it? What makes it different from the others? Will you get enough people to use it to make it different than the others? Does it fill a niche that others are missing? What kind of people do you expect to use it?
Google developed a very competent social network but with competition from Facebook very few people use it. And that's the problem with social networks: All the content is user generated; the only reason people go on there is for other users. If you don't have users you won't gain them.
Wow, this is not as easy as you think to accomplish... normally i would recommend php but that would just take you forever, some wise people today would tell you to use modern frameworks such as ruby on rails or python (django) instead to create a social networking site because it takes less time, money and resources in the long run... I believe one of the engineers at facebook (running on php/c++) said that if they had a chance to recreate their site they would have used python instead, infact the newest and fastest growing social networking site Pinterest was built on Python i believe..