Facebook reported second-quarter earnings and revenue that beat Wall Street forecasts on a growing mobile ad business, sending shares surging in late trading.
The social media giant reported revenue of $1.81 billion, up 53 percent from $1.18 billion a year earlier.
Mobile advertising revenue represented about 41 percent of Facebook's $1.60 billion in total advertising revenue in the quarter. Mobile made up just 30 percent of ad revenues in the first quarter.
(Read more: Behind the massive bet on Facebook)
"They've taken three or four quarters to try to fix the mobile issue," RBC Capital Markets analyst Mark Mahaney told CNBC. "They've gone from zero of their revenue being mobile to almost 50 percent now. That's pretty good evidence that they've fixed the mobile issue."