Yes, your examples are potentially unlawful. See HUD's guidelines here:
https://www.hud.gov/sites/documents/DOC_7781.PDF> § 109.25 Selective use of advertising media or content.
> (a) Selective geographic advertisements. Such selective use may involve the strategic placement of billboards; brochure advertisements distributed within a limited geographic area by hand or in the mail; advertising in particular geographic coverage editions of major metropolitan newspapers or in newspapers of limited circulation which are mainly advertising vehicles for reaching a particular segment of the community; or displays or announcements available only in selected sales offices.
If this sounds burdensome, it's supposed to be, changing society and correcting centuries of inequality and discrimination requires significant active effort.
Also remember that intent and reasonable expectations matter. You as an individual with limited means and no legal advice would be held to a different standard than Facebook, a corporation with many orders of magnitude more responsibility.
Finally, remember that law is not code. The Fair Housing Act is a tool to be used judiciously by humans to correct wrongs, not a precise standard that can be applied in the same way to every situation. It's not possible to write a law that anticipates every possible scenario, that's why we write relatively vague laws and involve humans at every step of the process.