https://www.gpo.gov/fdsys/pkg/CFR-2011-title29-vol4/xml/CFR-...
https://www.gpo.gov/fdsys/pkg/CFR-2011-title29-vol4/xml/CFR-...
It is a violation of title VII for a help-wanted advertisement to indicate a preference, limitation, specification, or discrimination based on sex unless sex is a bona fide occupational qualification for the particular job involved. The placement of an advertisement in columns classified by publishers on the basis of sex, such as columns headed “Male” or “Female,” will be considered an expression of a preference, limitation, specification, or discrimination based on sex."
Seems to me like they're legally in the clear, as long as the ad itself doesn't contain any indication. Same as only advertising in a publication whose readers are 99% male - Google's gender metrics aren't even that precise.
Of course, it's also the outcome I'd expect, but biased application of the law is a separate issue.
The placement of an advertisement in columns classified by publishers on the basis of sex, such as columns headed “Male” or “Female,” will be considered an expression of a preference, limitation, specification, or discrimination based on sex.
Facebook publishes the ad, and their target gender option surely falls in under "column classification".