Shara Tibken/CNET

Google and Facebook should engage with regulators so they don't face tougher repercussions later, the former CEO of Microsoft advised Monday.

"It's a whole lot better to engage with regulators than leave things to legislative action," Steve Ballmer said Monday at the WSJ Tech D.LIVE conference in Laguna Beach, California. He noted that companies should do things they don't necessarily want, in order to avoid more legislative oversight

"Companies will continue to get looked at," Ballmer said. "My own experience tells me we would have been better doing a little more than we wanted to early."

He added during a later panel at the conference that regulation by Congress could be one of the worst things to happen because legislators don't have the technical knowledge needed to make good regulations.

Now playing: Watch this: Apple, Facebook support more privacy laws

"It's super important to have experts," Ballmer said, and the best experts come from the Federal Trade Commission or Department of Justice, not Congress. "As much as that can be painful for a company, at least you're sitting down with other technical experts, who represent the best interest of the people."

Ballmer would know what it's like to face scrutiny by regulators. He oversaw Microsoft in 2002, when a federal judge concluded the company violated antitrust laws by leveraging its monopoly position in operating systems to capture the market for web browsers.

Microsoft's second CEO, Ballmer led the company after Bill Gates stepped down in 2000 until 2014. During his tenure helming the company, he helped launch the Xbox video game console and Bing search engine, and steered the company toward what became the company's successful Azure business server business. He also oversaw Microsoft's efforts to expand its software to phones and tables. The phone effort failed and cost the company billions of dollars, but its Surface line of computers have received positive reviews.

Since leaving, Ballmer bought and then sold a sizable stake in Twitter, funded a website called USAFacts that helps people better understand the US government spending, and bought the Los Angeles Clippers.

Former Chicago Bulls player Scottie Pippen attended Ballmer's talk Monday at the WSJ conference.

Google and Facebook -- along with Twitter -- have been facing scrutiny by the federal government over their business practices. The Silicon Valley tech giants are still in the doghouse with Congress after Russian trolls abused their platforms to sow discord and false news among US voters in the 2016 presidential election. Google, Facebook and Twitter have said they detected new campaigns from foreign actors attempting to influence public opinion ahead of last week's US midterm elections.

In September, Facebook Operating Chief Sheryl Sandberg and Twitter CEO Jack Dorsey testified before Congress, but no representative from Google attended. The three companies were summoned to Capitol Hill to testify before the Senate Intelligence Committee on election security, privacy and abuse on their popular social media platforms.

It may only be a matter of time before Google gets called in front of Congress again, and next time, the company will have little recourse but to send its top executives, analysts say.

Meanwhile, companies, including Apple, have called for more tech regulation, particular when it comes to privacy.

Tech and democracy

Ballmer, speaking later Monday during a panel about tech and democracy, noted there are technologies that can help people get accurate news, instead of fake news and spam. Social media is the No. 1 way people get their news, he noted, but it's also considered by people to be the least reliable form of news.

There needs to be "innovation around trust" when it comes to various commentators, news providers and others, Ballmer said.

"Tech will have to evolve to build the level of trust, even in social media," he said.

Palmer Luckey, the controversial co-founder of Oculus, said on the same panel that "we're seeing polarization between political parties making people disagree on things that should be bipartisan." That includes national security, he said. For instance, Google decided last month to pull out of the bidding for a $10 billion Pentagon contract after employee protests. Google said the project may conflict with its principles for ethical use of AI.

Shara Tibken/CNET

In Silicon Valley, "people have a little bit of a warped perspective," Luckey said. "Of course [people in Silicon Valley believe] it's dangerous for Google to give the military better techs. In broader America, almost nobody agrees with that."

He added that while the US isn't perfect, "if you're going to get upset about the ways tech is being used, look at China, where it's being used to mass profile its own residents and lock them up in camps."

Luckey is best known as the wunderkind inventor whose 2012 Kickstarter project for a new type of virtual reality headset called Oculus Rift drew billions of dollars of investment, reignited interest in the technology and made him a fortune in the process.

In 2014, Oculus VR, the startup he cofounded, was bought by Facebook for more than $2 billion, landing him on the cover of Time magazine. Back then, Luckey appeared destined to become a tech luminary promoting his company's products, similar to Apple cofounder Steve Wozniak.

It didn't work out. In 2017, Luckey left Facebook under a cloud of controversy following revelations he had helped fund weird political activity on the social networking site Reddit, including an apparent billboard outside Pittsburgh with a cartoonish likeness of then-presidential candidate Hillary Clinton and the words "Too Big to Jail."

The Wall Street Journal on Sunday reported that Luckey was placed on leave and then fired by Facebook for supporting Donald Trump.

CNET's Ian Sherr contributed to this report.

Originally published at 3:22 p.m. PT

Update at 4 p.m. PT: Adds comments by Palmer Luckey during a WSJ panel.

CNET's Holiday Gift Guide: The place to find the best tech gifts for 2018.

Best Black Friday 2018 deals: The best discounts we've found so far.