“Certainly advertisers have a singular purpose, they want to reach consumers in a positive way,” said David Reuter, the vice president for corporate communications at Nissan Americas. “It is up to the social companies to create an environment that provides that level of support and safety for the companies.”

Nissan immediately began working with Facebook to find a solution, Mr. Reuter said, and the brand has resumed advertising on the site. Mr. Reuter praised Facebook for acting quickly and said the company “assured us that Nissan will be able to opt out of advertising on any pages that may be deemed offensive.”

Dove, another brand that activists cited for having ads on Facebook pages denigrating women, said in a statement that it was working with Facebook to have such pages removed. “We are also refining our targeting terms in case any further pages like these are created,” said Stacie Bright, global director of marketing communications for Dove, which is owned by Unilever. “Facebook advertising targets people’s interests, not pages, and we do not select the pages our adverts appear on.”

Exactly how advertisers will be able to prevent their brands from appearing on Facebook pages with offensive content is unclear. Sarah Feinberg, director of policy communications at Facebook, declined to offer specifics about how advertisers would be able to better manage where their ads appear but said that Facebook had a policy that “if a page is flagged as controversial, there are not ads on those sites.” The site, she said, does not pre-emptively identify content as controversial until it is reported.

While traditional media companies have provided advertisers with more predictable ad positions — during a certain television show, for instance, or in specific pages of a magazine — the level of control that marketers have over online display ads is not as precise. Digital ads are often placed using high-speed algorithmic technologies that allow advertisers to aim ads at a certain demographic, say men ages 30 to 40.