Apple Inc. (Nasdaq: AAPL) said Monday that downloads of its Mountain Lion software exceeded three million in four days, making it the most successful operating system release in the company’s history.

Facebook Inc.’s social-networking service will be integrated with the software in an upcoming update, Cupertino, California-based Apple said today in a statement.

Mountain Lion is available through the Mac App Store as an upgrade to Lion or Snow Leopard users for $19.99.

Apple is adding functions to its software as part of a broader push to make its products work more seamlessly together, encouraging customers to purchase multiple devices. Mountain Lion has many features from the iPhone and iPad, including a notification system so text messages sent to those devices will also show up on a Mac computer.

That fosters “stickiness” so that users won’t want to switch to another product because of all the time and effort they have invested with Apple’s gadgets, according to Chris Jones, an analyst at market researcher Canalys.