Not that I disagree that iOS 5 was obsolete the second that iOS 6 was released (the numbers agree with us), but...
if (NSClassFromString(@"UICollectionView")) // or something that makes a lot more sense, but that came to mind immediately
{
// facebook stuff
}
// Twitter.framework stuff