Technological News Portal

Facebook Explains How Location API Was Built

Recently, Facebook brought status update features to apps through which users can add friends, locations, and share photos directly from the apps. Now Facebook is revealing how it has been able to generate such a buzz through its app by getting into the details of broadening the Location API according to ZDNet. Facebook said that it was trying to make location tagging universal for the past year and a half so that check-ins can be seen on Timeline, which is something that Facebook is the proudest of despite a considerable number of users preferring the old version so to speak of their Facebook experience.


However, this location app users can get involved with the places they have been and where they want to go next. For the past one and a half year, eight of the Facebook engineers were busy in building these new location features and the Timeline map working to put together Timeline, Places, mobile, search and tagging teams. Facebook has been trying to check out new features every now and then.

Last August, it finished off with its places product to introduce new location features. Now since this is the main focus, Facebook wanted this new feature to be also easy for users to use as well as take interest in. Hence, it became more than just being about informing where you are. You can also search your favorite places in your neighborhood. How did it all happen?

Facebook first asked for permission to use the GPS API to locate a user and then divided the globe into polygons. To deal with the large sized world and many polygons, it was important not to confuse the user. Hence, places were indexed in polygons in the first three letters of their names. These places could then be searched from any devise. When searched, the places could be more relevant or general in terms of a global search.

Facebook constantly improves its ranking of places, including check-ins and Likes and other timing details. Then Facebook runs an internal database search to show most relevant places on these features. This is as simple as it could get to be explained, the process though is obviously much complex which is why the Facebook engineers took time to make it. The new Timeline maps all kinds of information a user puts in to locate things exactly.

In Facebook’s own words about the aggregation algorithms for location pins:

“Building the logic for aggregating pins on the map was another interesting challenge because we wanted to choose an optimal algorithm for aggregation while ensuring that we show as many distinct pins as possible. One of our first, more optimistic options was to aggregate any two points that overlapped, but this would distort the order of the pins. Another option we explored was to always aggregate the pins that are closest to each other to make the solution deterministic, but this turned out to be too slow. Instead, an engineer on our team, Jon McCord, wrote an algorithm to deterministically draw these pins. At any point in time, two pins were aggregated only if they were each other’s closest neighbor. This was compared with all other pins to find another pin that satisfied this property. If found, the two pins were aggregated into a single pin. This process was followed until no overlapping pins remained.”

[ttjad keyword=”social-media-samrtphones”]

You might also like
Why Not Join 250,000+ Readers, Like You!
AND GET OUR LATEST CONTENT IN YOUR INBOX

SUBSCRIBE 
Your information will never be shared
close-link