maraujo / pySocialWatcher

Social Watcher on Facebook Marketing API
MIT License
109 stars 49 forks source link

Updated geo_locations function to cope with locations inside countries or regions. #17

Closed joaopalotti closed 5 years ago

joaopalotti commented 5 years ago

Added the possibility to search by name for particular locations inside given regions or countries.

E.g., get_geo_locations_given_query_and_location_type("Belo", "city", country_code="BR")

With this update, it is also possible to brute force and try to get all the locations (in particular, all cities) from a given region or country. This can be exhaustively done with:

watcherAPI.get_geo_locations_given_query_and_location_type("A", "city", country_code="BR", limit=1000) watcherAPI.get_geo_locations_given_query_and_location_type("B", "city", country_code="BR", limit=1000) watcherAPI.get_geo_locations_given_query_and_location_type("C", "city", country_code="BR", limit=1000) ....and so on.