Facebook's Ad Sales Surprise Investors, Sending Shares Up 17%

Mobile Now Makes Up 41% of Ad Sales

With a big earnings surprise, not all sins are forgiven—but Facebook Inc. is drawing some investors back.

On Wednesday, Facebook easily beat second-quarter profit and sale expectations, sending its shares up 17% in late trading. The company swung to a profit as its sales rose 53% to $1.81 billion from a year ago, boosted by a surge in mobile and local ad sales. The company booked a profit of $333 million, or 13 cents a share.