How is Facebook locating me when I use a VPN?

  • I am using a private VPN network for my internet connection. But it seems that if I go to http://m.facebook.com and try to check in, Facebook sees my location properly.

    My IP address seems to be from USA.

    I have cleared all the cookies. If Facebook can't determine the current location it uses the old one instead,that seems the only explanation I have? How is this done?

  • If you are using the Facebook app on your phone then you have already agreed to let the app access location services.

    Accessing Facebook through the browser on your phone will ask for your location like this:

    m.facebook.com wants to use your device's location

    The IP address will indicate a very rough location like a city or region. The check-in feature uses precise locations provided by the location service of your phone. Location services use GSM base station ID data, WIFI SSIDs, MAC addresses and the GPS location if available. The phone will then query a server on the internet using the GSM and WIFI data in order to get precise location information. It is similar on a computer although computers typically only have WIFI.

    So you must have allowed Facebook access to this kind of location data. IP addreses and foreign VPNs have nothing to do with precise location data.

    Chrome has started implementing Geolocation API since 2010:

    Wifi based location is only supported on Windows and Mac

    Geolocation API by browser:

    • Chrome uses Google Location Services.
    • Firefox on Windows uses Google Location Services.
    • Firefox on Linux uses GPSD - http://catb.org/gpsd/.
    • Internet Explorer 9+ uses the Microsoft Location Service.
    • Safari on iOS uses Apple Location Services for iPhone OS 3.2+.
    • Opera uses Google Location Services.

    Source and more details about HTML5 Geolocation API

    I am using chrome on ubuntu linux, so I guess chrome is accesing the SSIDs and MAC and query's facebook. That makes sense thanks

    I checked with Chrome and WIFI and Facebook was showing places nearby. Google maps located me within 10 meters.

    Actually Chrome is querying Google's servers and providing the location to Facebook.

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM

Tags used