Facebook (FB) logged a weaker-than-expected 6.8% rise in first-quarter earnings on Wednesday as the social-networking giant's progress on the mobile front was offset by surging expenses. 

Despite the earnings miss, shares of Mark Zuckerberg’s Facebook initially ticked higher in after-hours action as investors cheered new metrics revealing 30% of the company’s ad revenue is now deriving from mobile.

Facebook said it earned $219 million, or 9 cents a share, last quarter, compared with a profit of $205 million, or 9 cents a share, a year earlier.

Excluding one-time items, it earned 12 cents a share, trailing the Street’s view by a penny.

Revenue climbed 27.4% to $1.46 billion, exceeding consensus view from analysts for $1.44 billion. Ad sales soared 43% to $1.25 billion, making up 85% of total revenue during the quarter.

Underscoring the rising expenses, Facebook’s GAAP operating margin tumbled to 26% in the first quarter from 36% a year earlier. Excluding share-based compensation and related payroll tax expenses, non-GAAP operating margins dropped to 39% from 46%.

“We've made a lot of progress in the first few months of the year," Zuckerberg said in a statement. "We have seen strong growth and engagement across our community and launched several exciting products."

Facebook, which only began rolling out its mobile efforts just over a year ago, said its mobile ad revenue now represents about 30% of total ad sales, up from 23% at the end of the fourth quarter. That figure could help further ease concerns about the company's ability to monetize on the crucial mobile front.

At the same time, Facebook reported a 54% leap in mobile monthly active users to 751 million. Facebook said Instagram, the mobile photo-sharing app it acquired in 2012 for $1 billion, reached 100 million monthly active users during the quarter.

Overall, Facebook said its average daily active users rose 26% from a year earlier to 665 million. Monthly active users gained 23% to 1.11 billion as of the end of the first quarter.

However, some of this mobile progress was offset by rising expenses. Facebook said its GAAP costs and expenses soared 60% from the year earlier period to $1.08 billion, outpacing both revenue and earnings growth. 

The social network attributed the increase to rising infrastructure expense and increased headcount.

Research and development expenses soared 91.5% to $293 million, while marketing and sales costs were up 42% to $203 million. Facebook said general and administrative costs climbed 69.2% to $176 million. On the other hand, capital expenditures slumped 28% to $327 million.

After initially rallying, shares of Menlo Park, Calif.-based Facebook headed south and then bounced between gains and losses. Facebook was recently trading up 0.40% to $27.54 in extended trading.

Meanwhile, Facebook disclosed the departure of David Spillane, the company’s chief accounting officer, who will be replaced by Jas Athwal, its revenue controller since 2008. Facebook didn’t explain why Spillane is leaving and a spokesperson declined to comment. 

Also on the personnel front, Facebook announced the appointment of Susan Desmond-Hellman, the chancellor of the University of California, San Francisco, to its board of directors.

Follow Matt Egan on Twitter @MattMEgan5