PALO ALTO, Calif. — President Obama on Wednesday ramped up his criticism of the Republican Party’s budget proposal, calling it “radical” and “not courageous” in a town hall meeting at the headquarters of Facebook.

To a generally friendly audience at the social networking Web site’s sprawling corporate campus, the president outlined how his plan to reduce the deficit through spending cuts and raising taxes on the rich would be done without sacrificing what he described as key social safety nets.

Obama shared the stage with Facebook founder and chief executive Mark Zuckerberg, who asked questions of his own before allowing a Facebook employee to pose one. Zuckerberg then read questions submitted by users of Facebook who watched the event through a live online stream.

The president’s at-times combative answers contrasted with the jocular mood of the event. “Even though it’s Facebook, no poking the president,” chief operating officer Sheryl Sandberg joked, referring to a Facebook feature. When Obama said wealthy taxpayers such as Zuckerberg and himself should pay their share, the youthful Facebook CEO quipped, “I’m cool with that,” to an outburst of laughter and applause from the audience of high-tech executives, Democratic politicians and Facebook employees.

Obama touted his plans to solve the nation’s fiscal problems by reducing the deficit through spending cuts in areas such as defense. He said he would bring down the nation’s deficit by $4 trillion over a decade, with $2 trillion of that from such spending cuts.

But he remained in disagreement with Republicans that social services such as Medicare and Medicaid should be cut while the government attempts to shore up its fiscal woes.

“Nothing is easier than solving problems on the backs of people who are poor, powerless, or people who don’t have lobbyists or clout,” Obama said.

His appearance at Facebook’s headquarters was the first stop of a West Coast tour to talk up his deficit reduction plan and raise money for his reelection campaign — as well as appeal to the millions of young voters who use the social networking site and were crucial to his election in 2008. (The Washington Post Co. Chairman Donald E. Graham sits on the board of Facebook.)

The president left the Facebook event for two fundraisers in San Francisco, one at the Masonic Center, open to the paying public, and the other, more exclusive, at the home of Salesforce.com chief executive Marc Benioff, which had a $38,500 entry fee.

The purpose of the trip, which moves on to Reno, Nev., and then Los Angeles on Thursday, is to continue the political drumbeat of the president’s deficit-reduction plan and opposition to Republicans, who are launching similar attacks. Obama was scheduled to attend six fundraisers in the hope of kick-starting the collection of record donations for his run next year.

Republicans said in response that his California speaking tour offered only vague promises.

“House Republicans are the only ones with a detailed plan to preserve Medicare and Medicaid, create jobs and put us on a path to paying down the debt,” said a spokesman for House Speaker John A. Boehner (R-Ohio). “By comparison, the president has offered little more than campaign speeches. Solving these challenges will require a greater degree of seriousness than the White House has thus far demonstrated.”

As Obama sharpened his political attacks on the Republican leadership in Washington, he did so in friendly territory.

Obama’s town hall meeting at Facebook’s headquarters was attended by tech leaders, investors and politicians, including House Minority Leader Nancy Pelosi (D-Calif.) and California Lt. Gov. Gavin Newsom.

The president also talked up programs to bolster math and science education and immigration reforms.

“What Silicon Valley cares about is bigger solutions for the future and actually creating jobs and training a future generation through efforts like science and math education programs,” said Mitchell Kapor, founder of Lotus Development Corp., who was in the audience. Kapor sat by angel investor Ron Conway and musician MC Hammer.

Obama touted his initiatives, such as Race to the Top, which provides grants to states for educational reforms. He said Science, Technology, Engineering and Mathematics (STEM) programs also provide a platform for more Facebooks to emerge in the nation.

He received loud applause when he talked of immigration reforms that would allow more skilled and educated newcomers to live in the United States. He pointed to Andy Grove, the Hungarian-born former chief of Intel, as an important contributor to the economy. The president said new policies should be in place so that foreign-born talent doesn’t take its high-tech start-ups to China or France instead of to the United States.

The audience’s reaction cooled after the president offered few details on how he would achieve those reforms, which Silicon Valley has wanted for years. Obama said the changes would be done in “comprehensive immigration reforms” that would have to be resolved with agreement in Congress by Republican and Democratic lawmakers.

“This is a nation of immigrants. . . . That dynamism is what’s propelled our progress and kept us young. I think most Am ericans understand that and agree with that. At the same time, most Americans think there needs to be an orderly process to do that,” Obama said.

Staff writer Perry Bacon Jr. in Washington contributed to this article.