Shares of Facebook (Nasdaq: FB), the No. 1 social network, rose more than 3 percent Wednesday in premarket activity despite continuing fallout from its May 17 initial public offering. REUTERS

Shares of Facebook Inc. (Nasdaq: FB), the No. 1 social network, rose as much as 5 percent in Wednesday trading despite continuing fallout from its May 17 initial public offering.

They closed up 99 cents at $31.99, or 3.2 percent, after surging nearly 5 percent to $32.50 earlier. They were priced at $38 by principal underwriter Morgan Stanley (NYSE: MS), with JPMorgan Chase (NYSE: JPM) and Goldman Sachs (GS) last Thursday.

One reason for the gain may be the huge decline in shares of the Menlo Park, Calif., company as well as a new buy recommendation Wednesday by Needham & Co., not a participant in the IPO.

Needham gave a target of $40 for the shares. Previously, Shaw Wu of Sterne Agee in Dallas came out with a buy on the shares with a price target of $46 for next year.

The recommendations are based on potentials for Facebook to boost mobile applications, where Facebook is weak and has bought assets like Instagram to move there, as well as to tap the Chinese market.

Still, Morgan Stanley was subpoenaed by the Massachusetts Attorney General after reports that its analyst had advised some customers that estimates for future growth would lag. In response, the New York-based investment bank, which has the biggest U.S. brokerage network, said revised views of its stock analysts were taken into account but asserted nothing untoward had happened.

Investors also filed the first class-action lawsuits against Morgan Stanley. Robbins, Geller, Rudman & Dowd of San Diego, which won major claims against now defunct Enron, sued Facebook in U.S. District Court in New York as did Philadelphia lawyer Bernard Gross. Both seek damages because of false and misleading statements made in the prospectus for the IPO. Other lawsuits will likely follow.

Also, Mary Schapiro, Chairwoman of the U.S. Securities and Exchange Commission, said the entire IPO will be scrutinized by her agency. As well, the industry's own Financial Industry Regulatory Authority (Finra) said it would also probe the mechanics of the IPO.

As well, Sen. Tim Johnson (D-S.D.), chairman of the Senate Banking Committee, said he wanted to investigate the affair. Morgan Stanley was one of the Wall Street companies that received funds in the Troubled Asset Relief Program (TARP) established by President George W. Bush in 2008.

Besides huge demand for Facebook's $16.7 billion IPO, the largest for a technology company, the Nasdaq exchange operated by Nasdaq OMX Group (Nasdaq: NDAQ) acknowledged many glitches last Friday just before first public trading of Facebook shares was scheduled to begin. Priced at $38, first trades were at $42.05 but Nasdaq suspended trading nearly 30 minutes due to problems with executing orders from Morgan Stanley.

Several reports said Facebook officials might consider shifting their listing to the New York Stock Exchange. operated by NYSE Euronext (NYSE: NYX). That might prove tricky and would require approval from the same regulators now probing the entire process.

Meanwhile, Facebook CEO Mark Zuckerberg and CFO David Ebersman made no public comments. Under securities law, they are barred from most discussions about the company for several weeks after the IPO.

The market capitalization of Facebook on Wednesday rose to $68.4 billion. At its IPO price last Thursday, it was valued at $104 billion. The shares closed their first day of trading at $38.23, so the loss since Friday is about $35.6 billion in market value.