So yeah, you can distribute source code and still make money. Lots of companies do it. Red Hat, SugarCRM, Alfresco, etc.
In some ways it's probably even easier for an online service to both be OSS and be successful, exactly because it takes all the other "stuff" (hosting, devops, marketing, network effects, etc.) to be successful. And, in fact, there are OSS replacements for things like Facebook and Twitter. The problem is, very few people use them for whatever reason (probably mostly network effects).
So at least in regards to the Facebooks, Twitters, etc. of the world, the first question you'd have to answer, is how to get people to switch to your service, whether it's free software or otherwise.