You're confusing the business model (advertising) and the medium (software).
A company that makes radio program, and generates revenue by selling ad spots, is a media company.
A company that makes TV programming, and generates revenue by selling ad spots, is a media company. It's in the same line of business as the radio company, even though the radio company doesn't have any soundstages or camera operators.
And guess what, both of those companies stay media companies even if they start streaming sound or video in a browser instead of on the TV. That's just replacing the distribution team, a rather small part of their business by headcount. They're still media companies, because they make money by selling ad space in content.
The distinguishing feature of facebook is that it takes user-generated content, and generates revenue by selling ad space. That's the "social" in social media, it's what makes social media different from traditional media. But the other part is the same: They generate revenue by selling ad space inside the content that they manage.