Missing Cities on Autocomplete - geocoding

Using Here GeoCode API and Discover API to search city from zip.
Works sporadically.
Google Maps API never fails to show a city with just a zip.
There MUST be a way you can force HERE to show the city (or best city) for every zip.
Eg. example of autocomplete with city missing Anyone know why zip 22102 retrieves no city.
Thanks.

Related

"Recent interactions" pull via People API

I am trying to use Google's People API to pull the date of my last interaction (either email or calendar invite) with all my contacts. Basically whatever is in the red box in the screenshot below.
Google Contacts screenshot
I doesn't seem to be something that can be access via the People API, but I'd appreciate a confirmation. If anyone has found an alternative to get a similar data point (when was a person last contacted), it would be great !
I've tried pulling all the fields available through the API, or exporting contacts as a CSV, neither returned the date of last interaction.

Saving the city of an unregistered user. Django

I want implement feature: saving the city of an unregistered user in my django app.
Example
I visited the site for the first time. And chose my city. (not registerd)
I visited the site for the second time. Site identified my city.
How can I do It with django?
P.S. Could you please recommend articles or materials?
Example of the site https://edadeal.ru/
(you can chose city in the top right corner red text)
Have the user enter their postal/zip code first, in a popup.
Then, I would use a webservices API like EZCMD.com
to get a list of nearby cities, which the user will then select based on their postal code.
Then store that list in a cookie along with an anonymous user unique token. When the user comes back to the site, check for the cookie.
Check the token against your database for people who have visited the site and entered their postal/zip code.
To get the list of cities to put in your form you can do something like:
$.getJSON('https://ezcmd.com/apps/api_geo_postal_codes/nearby_locations_by_zip_code/GUEST_USER/-1?zip_code=90210&country_code=US&unit=Km&within=5', function(data){
//extract the data you need for your form here. This API might be best for the US,
//don't know about Russia.
console.log(data);
});
See jsfiddle to play with the API.
You can use this to set a cookie
Use this to set a unique token
I would recommended reading this question to understand how to retrieve IP address and location via GeoIP. This can then be stored as part of a model within the db.
You could get the code to check the db to see if the IP has previously appeared and if not then store it with the associated city.

Google Places Web API photos

I use Django-google-places extension to get a list of photos (place.photos).
But the list I get is very unpredictable - pictures of users, food, etc.
Does Google provide something to get place's main picture that represents cafe/restaurant better?
Or maybe there's a way to get the best picture from list?
Place Search returns summary information about place. Maybe you can try to get photos from Place Search endpoint. https://developers.google.com/places/web-service/search.

How to specify the country in facebook graph api search?

How to specify the country in facebook graph api search
im not very tech in this, need in simple form
https://graph.facebook.com/search?q=Sarkozy
Then, i want to have replies only in a certain country only.
https://graph.facebook.com/search?q=Sarkozy......?????
I have tried several methods, nothing worked out for being not knowledge in this
thanks in advance
Facebook uses geo ip to detect the country where the request came from, you should use a country proxy in order to "tell" facebook what kind of geo located results you want.

Is the list of cities that can be set for current city or hometown available?

It doesn't look like the input that FB uses for current city and hometown is available as a widget or dialog for developers to use. I'd like to create an autocomplete input field that uses the same names for cities and the corresponding ID's. There's the lists of the cities that FB publishes for post and ad targeting but that is incomplete and appears to be using a different ID space; I'd like the same cities and IDs that are available to users when they edit their current city on their profile. Using jquery to do the autocomplete part is doable but I just can't find an API or data source available to populate it.
Does anybody know how to access that data from the graph API, fql or any other Facebook sanctioned means?
I havn't seen a graph api or fql method for this. The best I have seen from Facebook is this list: https://www.facebook.com/ads/api/autocomplete_data.php which you would want to parse and cache the json since its a pretty big download. If you needed more details about the location, you could call the graph api by the id provided in that file.