Imagine a political campaign using social media to learn your spending habits, look at your web browsing history, get your cell phone number, and ultimately knock on your door. What if that campaign used a third party app to trick their supporters into giving you the keys to everything about them and, in turn, millions of their friends?

What would the media say?

Naturally the team behind it would be the "geek squad." The campaign would be celebrated for its "Big Data Brains." The media would applaud these "digital wizards" at the "forefront of campaign technology."

That, of course, was the praise heaped on Barack Obama's 2012 reelection campaign. It wasn't nefarious for Obama to have the head of Google recruiting talent, choosing technology, and coaching Obama's campaign manager. Nor for Facebook to be on their "side."

But when a consulting firm—not even the Trump campaign itself—does essentially the same thing, and a Republican wins the White House? "Launch a criminal investigation!" "Mark Zuckerberg must testify!" "Regulate social media!" "Delete your Facebook!"

While the Obama campaign had a database that was a "powerful tool," Cambridge Analytica was "harvesting" your personal info.

"Target sharing" became "data abuse."

Data went from being "crunched" to "stolen."

Facebook went from the "ideal way" to reach voters to being "weaponized."

Genius became "evil genius."

What changed? It's almost as if the media think everything Democrats do is virtuous, and everything Republicans do is nefarious.

The Obama 2012 campaign had a "massive computer database containing personal data on millions of American voters." They used "sophisticated computer programs" to mine data from social media.

"Anybody who contacted the campaign through Facebook had their friends and ‘likes' downloaded," NBC News explained, in nonjudgmental terms. "If they contacted the campaign website through mobile apps, cellphone numbers and address books were downloaded. Computer ‘cookies' captured Web browsing and online spending habits."

In fact, Obama's "geek squad" had been using cookies to track its own supporters’ online behavior since 2008.

"It spent the past 18 months creating a new, unified database, factoring in some 80 pieces of information about each person, from age, race and sex to voting history," the Wall Street Journal reported shortly after the 2012 election. (At least the campaign denied tracking its supporters' visits to porn sites.)

How did the Obama campaign get their "vast digital data operation"? Stop me if this sounds familiar.

"Every time an individual volunteers to help out—for instance by offering to host a fundraising party for the president—he or she will be asked to log onto the re-election website with their Facebook credentials," the Guardian wrote under the actual headline, "Obama, Facebook and the power of friendship."

They went on:

That in turn will engage Facebook Connect, the digital interface that shares a user's personal information with a third party. Consciously or otherwise, the individual volunteer will be injecting all the information they store publicly on their Facebook page—home location, date of birth, interests and, crucially, network of friends—directly into the central Obama database.

Third party apps? Users unwittingly giving away their data?

Enter Cambridge Analytica, the data company that consulted for the Trump campaign. The company at least paid Facebook users to take a personality test via a third party app. "These users volunteered to provide this information.… But the app also pulled personal data from all of the test-taker's linked Facebook friends without their consent."

Only 250,000 people took the personality test on the ‘thisisyourdigitallife' app, but this led Cambridge Analytica to having data on some 50 million people. How big was the Obama database then, if more than 1 million supporters signed up for their third party app, giving the campaign access to their Facebook friend lists?

"People don't trust campaigns. They don't even trust media organizations," said Teddy Goff, the Obama campaign's digital director. "Who do they trust? Their friends."

So the campaign targeted them, asking supporters to share messages and voter registration sign up information.

The company used by the Obama campaign for this "target sharing" was Blue State Digital. Like Cambridge Analytica, it worked to influence politics across the pond as well, for the Labour Party in the U.K. in 2015. I haven't heard any calls to investigate Blue State Digital.

After the Obama campaign used Facebook to its advantage in 2012, a former campaign alumnus noted its power.

"Facebook is now ubiquitous," said Dan Siroker. "Whichever candidate uses Facebook the most effectively could win the war."

Unless, of course, it's a Republican. That'd be criminal.