Today Facebook begins rolling out a new opt-in feature called Nearby Friends. It lets friends see approximately how far away you are from them, and you can share your exact, on-going location with them for a limited time. While it’s sure to stir privacy concerns, Nearby Friends could get people spending more time with friends in the real-world instead of online as it hits iOS and Android in the US in the coming weeks.

Below is a deep analysis of how Nearby Friends works, how it was built, its privacy implications, how it impacts the competitive landscape, and its long-term opportunities for Facebook. But here’s the tl;dr version:

Nearby Friends was built by the Glancee location sharing app team led by Andrea Vaccari that Facebook acquired in 2012. It adds a list of nearby friends to Facebook’s iOS and Android apps. It will also send notifications if you come within a short distance of a friend, and if someone shares their precise location with you you’ll see it on a map.

Vaccari tells me “the idea is to make it really easy to discover when someone is around you, and meet up and spend time together.” It wants to facilitate those serendipitous meetups where you run into a friend and end up having a meal or hanging out together. It’s a meatspace manifestation of Facebook’s mission to connect people, and a rebuttal to criticism that Facebook isolates us.

The feature could spell trouble for other location sharing apps like Foursquare and Google Latitude that haven’t reached ubiquity, as Facebook has built it into its core iOS and Android apps that have enormous userbases. It could also challenge the friend-gathering features of Highlight, Banjo, Sonar, Connect, and more startups. [Disclosure: I advise a college friend’s stealth social location-sharing startup codenamed ‘Signal’ that is based in San Francisco. This advising role has been cleared with AOL and TechCrunch’s editors.] Leaving Nearby Friends on will cause some battery drain, but not as bad as some other location apps, according to Facebook.

As for privacy, Nearby Friends is opt-in so you can ignore it and never have to use it if you don’t want to. It’s only available to people over 18. It uses a reciprocal privacy model so you can only see your proximity to friends if you both have it turned on, and you can only see someone’s exact location if they purposefully share it with you. While you can select the specific list or group of friends you want to share your proximity with, many people may simply keep this visible to all their friends — a very wide net. This and how easy it is to forget to turn off Nearby Friends could lead to inadvertent “oversharing”. [Update: And Facebook confirms it will use your Nearby Friends Location History to target you with ads.]

If people manage their privacy with the provided tools, Nearby Friends could help them gather with more friends for Tuesday dinners, Friday night parties, or Saturdays in the park.

How Nearby Friends Works

Once you get the rollout of Nearby Friends, you’ll see it in their app list in the Facebook navigation menu under “More” on iOS or Android. From there you can opt in to turning Nearby Friends on, and select if you want to share your proximity with all your friends, or a specific friend list or group.

You’ll then be able to see a Nearby Friends list that shows the distance away in increments of a mile (<0.5 miles, 0.7 miles, 1.8 miles) from anyone you’re sharing your proximity with who has also opted in and turned on Nearby Friends. The list also shows timestamps of when someone’s location was last queried,and if you’re in a big city it will also show their neighborhood.

Next to these friends’ names is a location icon you can tap to send that person your real-time location. You’ll get a chance to choose how long to share your location (an hour, a few hours, until tomorrow, until I manually stop) and include a 40-character message about what you’re doing or want to do, and perhaps a request that they send you their exact location. Otherwise you could send someone a Facebook message asking for them to send you their location. Anyone who shares their exact coordinates with you will show up on a map view.

What makes Facebook Nearby Friends different than competitors and could give it an advantage is that it’s centered around broadcasting proximity, not location. We’re much more willing to share how close to someone we are than where we are on a map, and it’s basically just as functional. If someone’s close, you’ll know, and can ping them about their precise location and meeting up. Broadcasting location is creepy so we’re less likely to share it, and can cause awkward drop-ins where someone tries to come see you when you didn’t want them to. The product only works if lots of people are using it, and the focus on proximity makes it private enough that they might.

Here’s a short video from Facebook showing how Nearby Friends works:

To get your location, Facebook will frequently pull your GPS coordinates. To minimize battery drain, it will read your accelerometer and not pull location as often if you’re staying still. Facebook’s testing says Nearby Friends 0.3% to 0.4% per hour. This is less than the 0.7% per hour Foursquare previously said it drains, and Facebook think it’s more efficient than Google Latitude, though the big G hasn’t released any specific battery stats. Vaccari tells me “Battery saving was one of the core principles as we were developing the product.”

If you don’t have Nearby Friends turned on, Facebook may try to coax you into opting in by showing teaser News Feed stories that read something like “3 of your friends are nearby right now, turn on Nearby Friends to see who and how close they are”. If you do have it turned on, you’ll see Feed stories that are basically excerpts of your Nearby Friends list.

If you have Nearby Friends turned on, Facebook will also occasionally send you notifications that a friend who has opted in is close. It intelligently looks at where that person goes frequently so as not to ping you everytime they get to work if you live a block away, and it reads their location and accelerometer to make sure they are just driving by but are actually stopped and potentially available to hang out.

Some frequent use cases for Nearby Friends include: “Which friends are in the park too?” “Is anyone else at this concert?” “Who’s nearby I could get coffee with?” “I’m in a new city, which of my friends are in this neighborhood?” But there’s also more niche possibilities. You could turn on persistent exact location sharing with your family for security when you travel. When you fly into an airport, you could see if friends are there too that you could split a ride with.

Facebook has recently been highlighting its new focus on standalone apps with its new Creative Labs initiative and the launch of Paper. But Nearby Friends is built into Facebook’s core apps because Vaccari says it only works “if you have a lot of people in the system. A standalone app would have given us the opportunity to make bigger decisions…but doing it in the main app, we guarantee you find most of your friends there.” However, Vaccari said it still could become its own app in the future. For now, Nearby Friends’ success may depend on just how much Facebook is willing to promote the product in the feed. It’s currently buried in the navigation menu next to Nearby Places, the Yelp-competitor Facebook launched last year that everyone forgot about.

Vacarri admitted he was a bit nervous in our interview as he’d been working on Nearby Friends for two years. Glancee had tried to make a social discovery app for making new friends, but realized “before meeting new people it was important to connect with people you already know, including people who aren’t your closest friends.” When Facebook came knocking, he saw the opportunity to use the existing social graph to build a product that let people actually connect in person. He hopes people will use Nearby Friends to spend time with their best buddies, but also people they like but aren’t close enough to text message.

Business Potential?

Facebook says that right now, Nearby Friends won’t be used for ad targeting. But there’s no denying how valuable location data could be to the social network. Imagine if the ads you saw in your News Feed were for restaurants or shops a block away. Those would surely be more relevant to users and more effective for businesses.

[Update: Facebook tells me “at this time it’s not being used for advertising or marketing, but in the future it will be.” Here’s our follow-up on how Facebook will make money from your location data.]

Is It Privacy Safe?

For being a feature that constantly shares your proximity to friends or your exact location, Facebook tried to make it respect our privacy. It’s opt-in, so no one will find it themselves sharing their coordinates without purposefully turning it on. You can turn it off any time with a few taps. You can set who sees your proximity, they have to be sharing their proximity with you to see yours, you have to explicitly share exact location, and unless you set it to share indefinitely, your exact location will disappear within a day.

When I asked Vaccari bluntly if the feature has strong enough privacy, he said “Yes, we think so. The way the product is built is safe by default. Location is not precise by default. We want you you to know there’s an opportunity to meet, not where [your friends] are.”

But just because Facebook built it with safety options doesn’t mean people will use them.

People should create a list of their close friends they’re comfortable sharing their proximity with and select that as the privacy setting. Most people won’t, though, and will just share with all their friends. That will includes bosses, co-workers, family memebers, and random people they met once but accepted a friend request from.

People will forget to turn it off. They’ll share their exact location indefinitely with plans to turn it off after a vacation together, but won’t remember to.

Luckily, since the app is based around proximity, the worst case scenario might be that your boss sees you’re somewhere close to a bar district at 2am or not near your apartment. Or a spouse sees you’re not getting closer to home after work — maybe because you’re getting a beer with buddies, but maybe because you’re…Which brings up the issue of partners essentially stalking each other by forcing one anothe to constantly share their exact location. Vaccari says there are plenty of niche apps that can do this. But it’s certainly a lot easier when someone already has Facebook installed.

Nearby Friends will be a test of our own ability to protect ourselves. Facebook has equipped us with all the necessary privacy options and set respectful defaults. Wielded skillfully, Nearby Friends could unlock real-world interactions in the way Foursquare and all the other check-in products were supposed to. More than money, power, or success, I truly believe spending time with people you love is the best route to happiness. We have plenty of tools for sharing and consuming memories. Finally Facebook has built a feature that will help us create them.