To make matters worse, a class-action lawsuit filed by a communications industry labor union argues that Facebook should be held liable for the ads. Aside from being accused of engaging in the ageist practice itself, the suit claims that Facebook essentially acts an employment agency for the firms that use its ads. The big blue behemoth is expected to shield itself using the Communications Decency Act, as it did when it was sued for allowing racial bias in its targeted ads for housing.

In the past, Facebook has been forced to apologize and backtrack on its ad targeting tools. As recently as September, the company removed anti-semitic categories from its ad network. And in November, Facebook handed Congress over $100,000 worth of ads purchased by a Russian group to influence the 2016 US presidential election. To make amends, Facebook hired 1,000 workers to manually review ads targeting race or politics.

But, this time round, the company claims it's doing no wrong. "Used responsibly, age-based targeting for employment purposes is an accepted industry practice and for good reason: it helps employers recruit and people of all ages find work," said Facebook's Rob Goldman, VP of ads. We've reached out to the company for a comment.

Meanwhile, some of the companies that placed the ads (including Amazon, Northwestern Mutual, and the New York City Department of Education), said they'd changed their recruitment strategies after being contacted by ProPublica and The Times. Others insisted the Facebook ads were part of a broader recruitment plan aimed at people of all ages.

Facebook isn't the only company offering these types of tools to recruiters. Propublica managed to buy job ads excluding those 40 and over on Google and LinkedIn, with the latter claiming it had changed its system when it was notified of the buys. Google, on the other hand, said it doesn't prevent marketers from displaying ads based on a user's age.

Facebook (along with the big G) is leading the pack when it comes to digital ads. Last month, it declared that the vast majority of its $10.3 billion quarterly revenue came from advertisements. The social network also introduced a job listings feature in 2016 in a bid to challenge LinkedIn's recruitment dominance.