Wait...isn't this exactly what the article is talking about?
Before online advertising you kind of had an idea of what the target audience of TV channels, news, and radio was like, but it was very fuzzy and you certainly weren't excluding people not in your target demographic that happened to utilize those media platforms. Women reading male fitness magazines or men reading female lifestyle magazines weren't the primary target of ads in those platforms, but they could certainly utilize what was being advertised if they so desired. The same is not true of online advertising today.
Facebook is more in the position of a newsstand than anything else, and it would be blatant discrimination if a newsstand wasn't allowing older people to buy technology magazines, for example.
In fact, you should do this to be inclusive. There are a lot of unconscious things hiring managers do that remove themselves from the running of highly qualified candidates.
Want to remove yourself from consideration from young talented female developers? Create a laundry list of "requirements" even though you consider them "nice to haves." Also add plenty of trigger words to make your business seem unattractive.
https://hbr.org/2014/08/why-women-dont-apply-for-jobs-unless... https://www.forbes.com/sites/hbsworkingknowledge/2016/12/14/...
Avoiding hurting yourself in the eyes of candidates you'd like to include is far from being discriminatory to other groups.