WASHINGTON – It seemed like an innovative way to buy a beer company: Start an online campaign to purchase Pabst Brewing Co. and sell shares on Facebook and Twitter to cover the $300 million cost.

Michael Migliozzi II and Brian William Flatow found 5 million people who said they would invest a total of $200 million. But the federal government halted the venture after it informed the two men of one major oversight — they neglected to register the public offering with the Securities and Exchange Commission, a violation of federal law.

On Wednesday the SEC said it reached a settlement with the two advertising executives. The men, who never collected any money, agreed to stop selling shares to the public.

The case spotlights a growing challenge for regulators, who must patrol business online ventures and ferret out scams disguised as stock offerings.