Earlier quoted context omitted.
If Facebook does a background news feed update on your iPhone and notices that your iPhone wifi is on the same IP address as another phone (Android or otherwise) with location enabled, then it can record a correlation. There's probably even better ways of doing it.
Straight up GeoIP is good enough, particularly on WiFi. On mobile networks I believe the carries will gladly sell the tower-IMEI mapping. They already have to collect that for law enforcement purposes anyway.
Right now GeoIP identifies my desktop computer as being in northern Nevada. I'm 400 miles away.
Right GeoIP identifies my laptop as being in Atlanta. I'm 2,300 miles from Atlanta.
Right now GeoIP identifies my wireless hotspot as being in Los Angeles. I'm more than 400 miles from Los Angeles.
Three devices, inches away from each other in reality. But GeoIP thinks they're on opposite ends of the country.
GeoIP has certainly improved in the last few years, but I would never rely on it for anything important.