Apple’s integration of Twitter with iOS 5 nudging away Facebook, the largest social networking site, didn’t seem to be Apple’s original plan as a video of test build of iOS 4 in April shows.

The video shows Facebook’s integration in the native app setting screen of the leaked iPhone, where there was no trace of Twitter. Now Twitter has occupied the same space that facebook had in the iOS5 menu settings.

Twitter is built directly into iOS5, so users can tweet directly from in-house apps including camera, photos, contacts, the Safari web browser as well as (Google-derived) Maps and YouTube.

In fact, Apple’s CEO Steve Jobs and Facebook’s CEO Mark Zuckerberg had spent good time together last summer and Apple had gone to the extent of trying to patent a contact sync technology that allowed users to directly befriend people on Facebook through iPhone contacts.

It was widely known that Facebook integration was planned for Ping and less widely known that it was planned for OS X Lion, but both integrations were pulled shortly after Ping’s launch in the fall.

Apparently, Apple and Facebook have several conflicting strategic objectives. Apple’s priority is to push users' content to the device, whereas Facebook wants to pull content to the cloud.

Facebook’s network of customers is built through relationships and access to content, which goes easily into the social network but comes out with greater difficulty. Twitter, which maintains an open community is easier for Apple to flow its content freely.