Here is the full text of the preference clause in question:
(c) To make, print, or publish, or cause to be made, printed, or published any notice, statement, or advertisement, with respect to the sale or rental of a dwelling that indicates any preference, limitation, or discrimination based on race, color, religion, sex, handicap, familial status, or national origin, or an intention to make any such preference, limitation, or discrimination.
Ignore the "to make, print, or publish, or cause to be made, printed, or published" because these are the "methods" that generate and distribute the notice. But it is the notice itself that has the property that "indicates any preference, limitation, or discrimination" or indicates "an intention to make any such preference, limitation, or discrimination." The point is that the expression or the intent has to be written in the notice.
Obviously, whoever wrote the Fair Housing Act should have avoided nesting sentence structures and written shorter sentences which are clearer to follow. That's my pet peeve with legalese.
With regard to real estate agent, again we should stick to the text of law. Sec. 805. [42 U.S.C. 3605] does prohibit a real-estate agent from refusing a transaction on the basis of protected class, but the seller can whisper any preference they want without violating the law as long as the real-estate agent does not execute on it. But Facebook is not a real-estate agent nor does it take part in any part of the housing transaction. It's unlikely for the court to argue that Facebook is a real-estate agent or conducted the transaction.
I think a likely outcome of this court case is that the lawmakers will amend the Fair Housing Act to explicitly prohibit targeted advertisement, which will likely face push back from the various lobbying groups. Or maybe the court will make a judgment against Facebook, but that judgment could be appealed and overturned in a higher court, or in a different court case. Ambiguous wording means that the judge could rule one way or another. If they just settle out of court and do nothing else, then people will know about the targeted advertising loophole and will exploit it, so that would accomplish the opposite of what NFHA supposedly wants.