There's no way they can be liable because they can't know if the ads are illegal or not. The legality of a given ad depends on many factors not always present in the ad itself -- such as whether the landlord lives in one of the units. All of the above selection criteria are perfectly OK to filter by if a landlord occupies a unit in a building with less than 4 units.
This is why it's legal to advertise for particular genders in a shared apartment scenario. It's also legal to advertise for other criteria like race in these cases -- though it's not socially acceptable.
It's impossible for Facebook to know whether a given ad is legal because of these hidden criteria.