Facebook Country list for user locations - objective-c

Is there a list of "facebook country names"?
in my iphone app , after retrieving the location information, I want to select the country back, and the user will be able to change it, so I have to find the list of countries and, if possible cities, used by facebook

I believe Facebook uses the ISO 3166-1 alpha-2 codes (2 digit country codes, ie United Kingdom is 'GB').
http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm

Related

SPOTIFY API - get artist top tracks by country

I'm trying to search for the artist's top track within a certain country market, unfortunately, it seems like Spotify doesn't allow that (since my account country is already set and cannot be changed)
https://developer.spotify.com/documentation/web-api/reference/#/operations/get-an-artists-top-tracks
I'm using a param in the request with the country code -> ?country=BRbut the response received shows results accordingly to my country.
I'm aware of the fact that -> "If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter"
Is there any way to bypass this?

What's South Korea's country name in API?

[SOLVED] the official name is Korea, Republic of. You can's miss any white space when you use it.
I am using Last.FM API, when I try geo.getTopArtists(Get the most popular artists on Last.fm by country), I need to input a parameter :
country (Required) : A country name, as defined by the ISO 3166-1 country names standard.
Then I checked ISO 3116-1, and found South Korea's name is Korea, Republic of
but it doesn't work. Then I tried korea, southkorea,koreaofrepublic ,all failed.
What should I input?
http://ws.audioscrobbler.com/2.0/?method=geo.gettopartists&country=korea&api_key=aa652ac51995d952d83d12093d25d9d9&format=json
It should be ISO 3166-1 country name standard .
https://en.wikipedia.org/wiki/ISO_3166-1
if you copy/paste this link in your browser, you will get the complete list of countries
that are supported by Rest Countries Api.
https://restcountries.com/v2/all
My suggestion is to do it in Firefox, because, list will be formatted in a readable way.
From there, you can search for the any data you might need.
For example, in the case of South Korea, you would go to the link, type 'korea' in the search bar, and you would get two results ( for North and South Korea), and when you expand the JSON object, you could read the exact name of the country as they listed it in their API. "Korea (Republic of)" in this case.

Prestashop force customer to select country

I am using Prestashop 1.7.1.1 and I need to force my shop customers to select country. Now it is always pre selected as my store default country (in my case Lithuania). Option to enable "Set default country from browser language" via International > Localization is not acceptable because a lot of customers is using browser language English, but real country is not United States or United Kingdom. For me it will be the best to set --please chose-- as pre selected value and force customer to select one from the list.
You can disable this behaviour by enabling first select themes\classic\templates_partials\form-fields.tpl if you use classic theme.
An alternative may be to use jQuery :
$("#id_country option:first").prop('disabled',false);
$("#id_country").val($("#id_country option:first").val());

Google Maps API Geocode Postal Code and set Country code?

I'm using this API call to Google Maps to get the latitude and longitude of a postal code
http://maps.googleapis.com/maps/api/geocode/json?address=2340&sensor=false
The postal code is in Australia. This API call returns locations all around the world with partial matching postal codes in the address.
Is there a parameter I can use to set the country to Australia?
Thanks
The correct way to do this is not via region biasing but rather using component filtering:
https://maps.google.com/maps/api/geocode/json
?components=country:AU|postal_code:2340
&sensor=false
Some demonstrations:
2340
93274
Please note that if you use the components parameter, you don't need to specify the address parameter.
The documentation says that Region Biasing is based on CcTLDs, which would make Australia au (haven't tried it myself).
Although it also states this:
Note that biasing only prefers results for a specific domain; if more relevant results exist outside of this domain, they may be included.

What kind of international code is used for identifying countries like

I need the name of the code in with:
ROM: Roma, Italy
BCN: Barcelona, Spain
MAD: Madrid, Spain
BUE: Buenos Aires, Argentina
PCM: Playa del Carmen, Mexico
PAR: Paris, France
LON: London, UK
etc...
I am developing an app that searches flights between countries and I need a full list of this kind of codes to interatct with another third party API.
I tried to google it but the only things that apears are flight sites instead of a wikipedia page or something.
Can you give me any pointer?
These are IATA (3 letter) Airport Codes.
This list may help you:
http://www.photius.com/wfb2001/airport_codes_alpha.html.
You could also use the official IATA search engine (Location code category).
If you want an officially sanctionned list, you apparently need to pay a hefty price.
It seems you are looking for IATA airport codes:
The assignment of these codes is governed by IATA Resolution 763, and
it is administered by IATA headquarters in Montreal. The codes are
published biannually in the IATA Airline Coding Directory.
Unfortunately, that authoritative list is quite expensive. But I am certain you can find many unofficial lists by searching the web.
Use 'World Airport Codes' search query and Google's your uncle. Below are some links from my search:
World Airport Codes
Airport Codes
Localized World Airport Codes
Openflights