Social networking sites Twitter and Facebook were used in online versions of a classic “pump and dump” stock fraud, netting around $7 million. The fraud was discovered during a cocaine-trafficking probe, said U.S. prosecutors on Tuesday.

The sites were used to “defraud the investing public into purchasing stocks that were being manipulated by participants in the conspiracy,” according to a statement by the Manhattan U.S. Attorney’s office.

The U.S. Attorney’s office said that 11 out of the 22 people charged used more than 15 websites, Facebook pages and Twitter feeds to commit wire fraud in the stocks scheme. The group, based in New York, Florida and Pennsylvania, used the social networking sites to promote top picks in penny stocks, supposedly based on their own expertise and independent research.

Suckers? Maybe, Maybe Not

Before you laugh, thinking to yourself “there’s a sucker born every minute,” let’s remember – there are, in fact, legitimate businesses that do the same thing these scammers were doing in their fraud scheme.

StockTwits, for example, is an online community of investors where users sign in with their Twitter account to keep track of stock-related news. The service pulls in tweets tagged with a $ before a stock symbol (ex.: $AAPL). And in June of this year, CNN Money and MarketWatch began using the service to curate tweets for syndication via website widgets. In August, StockTwits partnered with SecondMarket to track private stocks, too.

Competing service FINIF Financial Informatics, does something similar – it gathers sentiment reports in real-time from SEC filings, news headlines and Twitter. FINIF scans all recent Twitter updates that reference a stock symbol and then measures the sentiment using a custom word list to create the “sentiment score” for a given stock.

Plenty of smart and savvy investors use services like these to augment their research into various stocks. In other words, getting investment advice via Twitter isn’t as dumb as you may think.

The trick is knowing when that advice is worth acting on. For those duped out of the $7 million, the penny stocks touted as “good bets” by the scammers obviously weren’t.

Neither Facebook nor Twitter are commenting on the announcement, according to Reuters (and we’ve confirmed).

sarah perez