How to get city and state name from location

We get the location of the user \ friends as follows →

location = {id = 104048449631599; name = "Menlo Park, California";}; 

On our side, the location is divided into city and state. In our database we save the city and the state - these are two different columns or tables. We are building an application for the US market only. It would be safe to assume that the name of the location has only 2 components - the city, the name of the state. Use "," as a delimiter. In my understanding, the Identifier is unique, it is their FB service, which, if provided, will provide information about the city and state separately.

+6
source share

All Articles