ReadWritePredict is a look ahead at the technology trends and companies that will shape the coming year.

Not long ago, most people had written off Foursquare as a has-been, the Mayor of Debt Town, saddled by a $41 million loan from Silver Lake and its current investors. The check-in service it offered was no longer a hot trend, and its prospects for revenues looked weak after reports surfaced that it had only done $2 million in business in 2012. 

Now Foursquare has done something unexpected: It has not just survived but seemingly thrived. The company just raised $35 million in fresh cash, wiping some of that debt off its books. Its revenues are growing quickly. And its usage is expanding around the world, in surprising places like Beijing and Istanbul—wherever there is a mess of urbanity to be mapped.

Perhaps most importantly, Foursquare has become the favorite way for mobile-app developers to add location as a feature. Everyone from Uber to Pinterest and WhatsApp uses Foursquare’s directory of places.

The Foursquare Bidding War

So who ends up with this prize?

Don’t get me wrong—part of me, after seeing founder and CEO Dennis Crowley’s stubborn struggle to realize his vision, would applaud an independent Foursquare. But it's hard to see how the company gets to public-company scale. Crowley may want to soldier on, but his troops are getting tired—like longtime collaborator Alex Rainert, who recently stepped down as Foursquare's product chief.

Foursquare's growing advertising revenues have bought Crowley time. But ultimately, the value of Foursquare may lie in its appeal to app developers. And first and foremost among them is an app called Instagram.

Facebook, of course, bought Instagram for $1 billion in 2012. True to his word, Facebook CEO Mark Zuckerberg has not interfered with Instagram, letting founder Kevin Systrom run it independently. The fact that Instagram still uses Foursquare's database of places, not Facebook's, is a telling example of that.

That seems like a dangerous dependency. Instagram has far outgrown Foursquare—it has 150 million monthly active users, while Foursquare, which does not give numbers for its active users, says 45 million users have registered with the service.

But Foursquare may have the upper hand. It is uniquely hard to replace. While Google, Yelp, Yext, and Facebook have directories of businesses, few services match Foursquare for its collection of quirky, noncommercial points of interest. Those are naturally the kind of places Instagram users like to document.

And Facebook has not given up on weaving place information into its social network. When he unveiled Facebook's first attempt at matching Foursquare, Facebook Places, product chief Chris Cox described it as a way to create collective memory." Facebook may not have nailed that idea, but when you look at a collection of Instagram photos tagged to a Foursquare location, you see Cox's vision realized.

Future Forward

So imagine this scenario: Google or Microsoft or Apple, eager to bolster their mapping services, will inevitably bid for Foursquare in 2014. Or perhaps PayPal, eager to chart anywhere you can spend money, may make a move. That may well force Facebook's hand.

Foursquare’s real-time recommendations paint a powerful picture of the future. Foursquare’s real-time recommendations paint a powerful picture of the future.

As part of Facebook, Foursquare will have far more value than just a directory of points on a map. It will be part of a growing suite of services Facebook offers to mobile-app developers, from Facebooks own login and friends list, to the back-end services offered by Parse, and the distribution Facebook offers through the News Feed and App Center.

It could also launch Facebook into new areas of business. Already, Foursquare's real-time recommendations for where to go next offer glimmers of anticipatory computing—a form of artificial intelligence where computers smartly take into account a variety of external inputs to mimic human decision-making.

Facebook is currently designed around the act of remembering. It anticipates only what you might want to read from what your friends have already posted. Thats so over. Its Timeline profile pages are built for nostalgia. This might be why teens are growing bored with Facebook, even as adults warm up to it: Its about the past, not the future.

So picture Foursquare's anticipatory algorithms applied more broadly to Facebook—to music, movies, news articles, even people. It's kind of scary to imagine Mark Zuckerberg, who already knows what we've done with our lives, telling us what to do next. With Crowley's help, though, he might just have the chance to do it.