I’m risking of stating the obvious with this one, but I’d bet my shirt many of your were unaware of this little trick. As you know, Facebook integration in iOS 6 and OS X Mountain Lion can automagically update photos and user names for all matching contacts. What you may not have known is that Apple only needs a person’s phone number to pull this data.

So if a girl you met at a bar last night left you just her phone number, you can easily get her Facebook profile picture to appear on your iPhone when she happens to call you – even if you’re not friends with her on Facebook and even if her profile is hidden on Facebook. Plus, you’ll get her full name in Contacts. How cool is that?

TechCrunch has the story, based on an interesting catch by Daniel Ioffe.

This started yesterday because a friend of mine tried setting me up on a blind date. He sent me a girl’s phone number and I registered it into my phone and just started chatting with her. I only had her name and phone number. Then I Updated All Contacts with iOS 6 and boom I all of a sudden had her full name in the form of her Facebook user name and her photo.

This works even if a person hid their profile on Facebook. Plus, Facebook integration in iOS 6 will take care of updating your empty contact (sans a phone number) with their full name on Facebook.

This is actually a Facebook feature rather than an iOS bug. To prevent total strangers to pull useful Facebook data using your phone number, go to the “How You Connect” section of your Privacy Settings page, hit the Edit Settings and choose Friends under the “Who can look you up using the email address or phone number you provided?” section.

This ensures that only your friends can type in your email address or phone number into the Facebook search field to get to your profile. The same restriction applies to third-party apps that talk to Facebook, including iOS.

Summing up: based on just a phone number alone, Facebook integration in iOS 6 will update your iOS Contact entry with that person’s Facebook profile photo and full name, in addition to their Facebook email address and possibly other data, depending on how much they share on their Facebook profile.

If you change default “Everyone” setting in the “How You Connect” section of your Privacy Settings page on Facebook, none of your Facebook information (like your full name or profile photo) will populate iOS Contacts of random people who happen to have your phone number.

Now, you probably know that iOS can also add all of your Facebook contacts and calendar items to stock Contacts and Calendar apps.

Specifically, when you give Facebook access to your Contacts and Calendar under Settings, iOS creates new contact and calendar groups on your device, containing Facebook-specific entries.

In other words, all you Facebook friends will be added to a new Facebook group in Contacts. What’s more, the new contact group is live updated as your friends change their Facebook profile photo, phone number, email address and so forth.

This can have undesired consequences as your friends’ birthdays will be added as reminders to iOS Calendar.

Of course, you can always choose to hide Facebook contacts in the Contacts app and/or Facebook events in Calendar, plus disable birthday reminders.

CNET has a nice article on understanding Facebook integration in iOS 6.

This is a rather complex issue so feel free to share your tips down in comments.