When former Texas Solicitor General Ted Cruz announced that he was running for Senate, many didn’t think he would win. After all, he was entering a Republican primary race with eight other candidates, including the state’s Lieutenant Governor David Dewhurst, an old guard of Texas politics and the presumptive favorite. Fast forward 18 months, a general election, and a run-off later, Ted Cruz is now headed to Washington.

Just how did the underdog do it? According to a recent article, Cruz masterfully employed social media.

For Cruz, the decision to turn to Facebook, Twitter, and the blogosphere was made out of necessity. The candidate’s war chest was paltry when compared to Dewhurst’s. The financial hardship forced the Cruz campaign to rethink their media strategy. Instead of spending money on TV spots, the candidate tried to woo the state’s conservative bloggers, which he did successfully largely by giving them access through the duration of the race and hopping on calls with them on a weekly basis.

Cruz also heeded the advice of Facebook and Google representatives, including Rob Saliterman, a Republican outreach strategist for the latter who provided insight on search ads.

“This campaign was unique because digital wasn’t done to check off a box,” Cruz’s campaign digital strategist Vincent Harris told Politico, “digital led until maybe a few months ago.”

The plan paid off. Cruz’s social media numbers are staggering: 85,956 fans on Facebook and 27,051 followers on Twitter. Dewhurst, in contrast, has 10,439 fans and 4,365 followers, respectively. More importantly, Cruz also gained the support of the active-online Tea Party, which led to endorsements by Sarah Palin, South Carolina Senator Jim DeMint, and Kentucky Senator Rand Paul. All of this led to the candidate nabbing 34.2 percent of the vote at the May primary elections, enough to prevent Dewhurst from gaining the majority of the vote and force Tuesday’s run-off election.

In the end, Cruz left no social media stone unturned. He’s also changed the role that social media plays in political campaigns.

“Dewhurst has been running for office for a long time,” stated University of Texas political scientist Sean Theriault,” but the rules have fundamentally changed as to how people do that.

“[Dewhurst]’s modernized a little bit, but he didn’t realize there’s been a revolution of how candidates speak to voters. The people who have surrounded and endorsed Dewhurst have the old campaign mindset. The Cruz people don’t.”

The news that Ted Cruz beat out heavily funded Dewhurst might serve as comfort for someone unexpected: Barack Obama. As anyone who’s signed up to receive emails from the Obama campaign knows, Mitt Romney is outraising the president by a significant margin, the first time in history that’s happened to an incumbent president.

But like Cruz, Obama is using social media better than his opponent. Earlier this week, the campaign released a new iPhone app that can be used for canvassing. Such advances might make all the difference in the upcoming presidential election.

Photo via Gage Skidmore