I don't know how the details of this is done. However, you should assume that every piece of that that the Facebook app has access to, it will relay back to HQ. It will be stored and correlated with other datapoints that they have of you. They will know who you encounter as you go about your day.
I'm super surprised that they haven't made a dating app out of this.