Since the social network doesn't ask users to racially identify themselves, Facebook collects activity data and then assigns each user an "ethnic affinity." This is basically a preference for stories, events and organizations that coincide with those the social network believes are also held by a certain ethnic group.

At this year's South by Southwest, a Facebook entertainment executive and Universal Pictures' EVP of digital marketing held a panel explaining how the studio harnessed the social network's "ethnic affinity" ad targeting tools to show different trailers of the movie Straight Outta Compton to different ethnic groups. The preview shown to Facebook-assigned "non-multicultural" (non-African-American, non-Hispanic) users showcased the film's characters wielding guns, driving tricked-out cars and clashing with the police. The trailer shown to African-American-affinity users seemed to be from a wholly different film, a memoir about real performers' historical impact.

Targeted advertising isn't new, especially for Facebook, but targeting or excluding ethnic groups is dangerous legal territory. In a report released this morning, ProPublica suggested that the "ethnic affinity" preferential advertising potentially violates the Fair Housing Act of 1968, which makes it illegal to print or publish, or allow to be printed or published, any housing advertisement that indicates preference or discrimination based on race, color, religion, sex, handicap, familial status, or national origin. That was a specific elaboration of the Civil Rights Act of 1964, which legally forbids any ads from listing prohibited preference, limits or discrimination when recruiting employees.

Facebook's policies forbid using its ad-targeting tools to "discriminate against, harass, provoke, or disparage users or to engage in predatory advertising practices." If advertisers do use Custom Audiences, they have to abide by its terms, which were updated September 30th, and comply with local laws. "Ethnic affinity" seems as close to targeting a racial group as Facebook can get without running aground of the above laws, though Ars Technica points out that the "affinity" group definitions resemble ethnic makeup far more than shared interests.

ProPublica noted that they created an ad seeking housing hunters on Facebook that excluded anyone with an "affinity" for minority groups, which they note was approved 15 minutes after submission. When they showed prominent civil rights lawyer John Relman their options to exclude minority-affinity users from seeing their Facebook ad, he said it was a blatant violation of the Fair Housing Act, and would be therefore illegal. When asked for comment, Facebook said that ProPublica's ad was for an event about housing but not seeking individual renters or buyers; Thus its targeting applied to potential attendees, not customers.

But it's unclear whether Facebook's digital advertisements would be bound by the same laws prohibiting racial discrimination in ads appearing in print publications. Is publicly broadcasting an ad saying "whites only need apply" the same as only showing certain advertisements to certain ethnic-interest-aligned groups?

In a blog post, Facebook's head of multicultural Christian Martinez stated that the social network expressly prohibits so-called "negative exclusion," like advertisers listing ethnic or gender preference for tenants or employees. Exclusion targeting, however, is a common tactic in the ad industry to show material only to people for whom it's relevant -- or who have the right cultural context. As Martinez writes: "This prevents audiences for community-specific ads from seeing a generic ad targeted to a large group and helps avoid the offensive outcome that traditional advertising can often create for people in the minority."

Facebook said a business used the "ethnic affinity" filter to target the US Hispanic community during the 2014 World Cup; Likewise, companies could use it for marketing hair products for African-Americans or for Spanish beer. This targeted delivery of material catering to certain ethnic groups is common to the advertising industry.

"All major brands have strategies to speak to different audiences with culturally relevant creative. Just for purposes of illustration, a car company will run creative for one of their vehicles, but will have one creative execution targeting the Hispanic affinity cluster in Spanish. They may create a different creative for the African American affinity cluster featuring black actors and stressing another insight that is specific to that group. All major brands do this because they know that audiences respond better to creative that speaks to them specifically, " Facebook said in a statement.