Democratic Rep. Beto O'Rourke has spent more on Facebook ads than any other candidate in the midterms, dropping $5.3 million on his social media campaign in the last four months and popping up in the news feeds of users.

O'Rourke is a frequent user of Facebook in his attempt to connect with voters, hosting a live feed of his campaign events and other activities on the trail.

He is challenging Republican Sen. Ted Cruz in an uphill battle for his seat. His opponent has only spent $400,000 on Facebook ads from May to October 20, new data released from the company revealed.

Democratic Rep. Beto O'Rourke has spent more on Facebook ads than any other candidate in the midterms

O'Rourke is a frequent user of Facebook Live videos, here broadcasting his stop at Whataburger after his first debate with Republican Sen. Ted Cruz

Beto O'Rourke has harnessed social media to raise millions for his campaign

And, in just one week, between October 14 and October 20, O'Rourke spent more than $500,000 on his Facebook campaign, according to CNN, which first reported the data.

But the second overall biggest spender behind O'Rourke was President Donald Trump, whose presidential campaign dropped $4.7 million on Facebook ads in that four month period.

That money was divided between a couple different campaign entities: $3.1 million paid for by the Trump Make America Great Again Committee and $1.6 million paid for by Donald J. Trump for President Inc.

Since May, more than a quarter of a billion dollars has been spent on ads relating to 'politics and issues of national importance' on Facebook, the company said.

O'Rourke has harnessed an online army in his effort to unseat Cruz. No Democrat has won statewide office in Texas in 24 years - since 1994.

And it has paid off in some ways - particularly fundraising.

O'Rourke's campaign announced earlier this month a titanic third quarter fundraising haul of $38.1 million. It's the most ever raised in a quarter by a U.S. Senate campaign.

He has not accepted PAC money and said the impressive haul came was 'powered by 802,836 individual contributions.'

He does Facebook live videos in the most random settings: in line at the drive through at Whataburger after a debate with Cruz, waiting to get a haircut, and when he goes for a job - often talking to supporters who have joined him for the run.

Cruz has run a more traditional campaign; President Trump was in Houston on Monday to hold a rally for Cruz and the two former rivals hugged it out

O'Rourke - with his deputy campaign manager Cynthia Cano - will often host Facebook Live videos from his car while driving to campaign events

Cruz is running a more traditional campaign, making stops in GOP strongholds and bringing in President Trump, who held a rally for Cruz in Houston on Monday evening.

The two former rivals for the GOP presidential nomination hugged it out at the rally with Trump saying they are now friends.

Trump told the cheering crowd Cruz has 'become a really good friend' after a rivalry that he admits 'got nasty' at the height of the 2016 primary.

'And then it ended. And I'll tell you, nobody has helped me more...then Sen Ted Cruz. Nobody,' he stated.

The president has also had harsh words for O'Rourke.

'I think Beto O’Rourke is highly overrated. From what I heard about him I thought he’d be special. He’s not,' Trump told reporters at the White House before leaving for Texas on Monday.

Cruz leads O'Rourke in their contest by 7 points in the RealClearPolitics polling average.