In iOS 5 -- the current-gen operating system for the iPhone, iPad and iPod Touch -- Apple elected to optimize nearly every app for Twitter, which allowed users to tweet photos, webpages from Safari, videos from YouTube or even their location, for all of their Twitter followers to see.

The integration was simple and easy: Users would sign into their Twitter accounts just once, and from that point on, they could tweet almost any kind of content from their mobile device.

In iOS 6, which was unveiled Monday at the 2012 Worldwide Developers Conference (WWDC) in San Francisco, Apple decided to apply these same tactics of deep integration with Facebook, the world's largest social network with more than 900 million users.

Tim Cook hinted at Facebook integration into iOS 6 when he appeared at AllThingsD's D10 Conference on May 29 in Rancho Palos Verdes, Calif.

Facebook is a great company and I have great appreciation for them, Cook said. Our relationship is very solid. ... For us, we want to provide customers simple and elegant ways to do the things they want to do. Facebook has hundreds of millions of customers. So, anyone that has an iPhone or iPad, we want them to have the best experience with Facebook on those platforms. So stay tuned.

Twitter has benefited plenty in less than a year on iOS 5: Since October, users who adopted iOS 5 sent more than 10 billion tweets, they comprised more than 47 percent of all photos uploaded to the site, and Twitter's adoption rate on iOS grew more than three times in the latest iOS update, likely because of the easy sign-in method. Facebook will likely enjoy the same tremendous benefits as Twitter once it becomes integrated directly into Apple's popular mobile hardware and software lines.

Apple looks to do the same for Facebook in iOS 6: After signing into their account just once, users will be able to share content -- text, links and photos -- onto their Walls or each others' Walls, seamlessly sync their Address Book Contacts with their profile photos from Facebook, and receive notifications over the Notification Center.

This is all great for Facebook, but what is Apple getting in return? Don't think for a second that Apple isn't thrilled to be getting access to more than 900 million users. Here's how Facebook integration helps Cupertino's computer giant:

App Store: Facebook integration helps Apple tremendously, especially in the App Store. Apple has relied on users to rate and review its content, but all of those users are strangers. Some may be younger than you, some may be older; you don't know exactly who is recommending this game to you. With Facebook integration, you can see exactly how many of your friends, and which ones, like a particular application. Facebook also adds a Like button directly in the App Store so you can like it yourself without ever having to leave the page.

Recommendations from your friends are substantially more powerful than recommendations from strangers. By leveraging the vast audience on Facebook, users may feel particularly more compelled to download applications, especially if they see that their best friend, or maybe their crush, or their girlfriend, downloaded it, too.

Game Center: Apple introduced the Game Center in iOS 5, which allowed users to keep track of their scores and achievements within individual games, as well as find friends and other people to play games with and against. The move into gaming has been extremely successful for Apple so far: The network has more than 130 million user accounts that submit more than 5 billion scores every single week. The top two-thirds of all App Store games integrate with Game Center, but the platform still needs an added boost.

Game Center always had the ability to find your Facebook friends, but now you can also post your high scores directly to Facebook, just in case you wanted to brag about your last Temple Run. But more importantly, users will be able to see which games in the App Store their friends have downloaded, rated, or reviewed.

Calendar: Calendar is a simple planning application that syncs across all of your iOS devices via iCloud; yet, except for heavy enterprise users, the app is barely used. Apple wants to change this, and it effectively has, thanks to Facebook.

Now, you won't have to be a businessman or a studious scholar to be regularly updating and checking your calendar. With seamless integration with Facebook Events, all of the information about the event, including the date, time and location, automatically updates to your iPhone or iPad. You can also set and receive reminders for your events, and Calendar in iOS 6 will even help keep track of your friends' birthdays so you don't have to.

iTunes Store: In the same way users will be able to see which friends like an App Store app in iOS 6, they will also be able to see which of their friends like a particular song, album, show, or movie. It's another great way to discover multimedia your friends also enjoy, and this will also likely boost the purchasing and downloading habits of iTunes customers.

Even though the App Store is a tremendous ecosystem, the iTunes Store is where all of the big-time, multi-million dollar partnerships are. Apple has some big deals with a number of film companies, artists, filmmakers and record labels, and all of these groups will surely be pleased that their content will also be enhanced by Facebook's simple but effective recommendation engine.

Facebook Anything, Easily, Anytime: In iOS 6, whether you're on your iPhone or iPad, users will be able to post almost anything to Facebook at any time. This could create some oversharing effects, of course, but for those volume users, this will be an absolute pleasure.

Just snapped a photo? Share it with Facebook. Found a funny website? One tap and a short message later, it's already on your friend's Wall. Too tired to type your posts? Speak into Siri and she'll dictate your post for you and even send it away. But unlike Twitter, users won't be limited to 140 characters; they will be able to post as many messages as they want, as long as they want them, with as much information attached (location, who with, etc.) as they want.

Facebook Benefits Too

Apple and Facebook have always liked each other's company. On several occasions, Apple's late founder Steve Jobs took the time to acknowledge and praise Facebook's founder Mark Zuckerberg, and Zuck has also said that he tries to model his company after what Apple has done. Both companies' philosophies align well, but Apple's olive branch to Facebook couldn't come at a better time for the Menlo Park, Calif.-based social network.

After Facebook went public on May 18, the company once valued at over $100 billion saw its stock plummet. This Wall Street behavior won't stop Zuckerberg's team from innovating, but the company clearly needs an added boost in the public eye. Seems an Apple a day keeps the bankers away.

By befriending Apple in this deep way, Facebook gets more validity to its own platform. Like Buttons were everywhere before, but once they're embedded within all of Apple's products, including the iOS line and the Mac line, Facebook will have finally arrived. No doubt Facebook will take advantage of Apple's new Smart Banners, which is an intelligent way to embed advertisements for other mobile products and applications, and if the recommendation engine results in dramatically increased profit margins for the record labels and film companies, Facebook could find its way back to black.