Situation:
I'm currently working on a project where a user can search for a city. To get the result i use this url via ajax:
https://graph.facebook.com/search?q=**sundsvall**&type=adcity&country_list=**se**&access_token=
When I send a request to facebook like that I get a response like this:
{
"data": [
{
"name": "Sundsvall, Sweden",
"key": 220260543,
"subtext": "Vasternorrlands Lan, Sweden"
},
{
"name": "Sundsvallen, Sweden",
"key": 220260542,
"subtext": "Jamtlands Lan, Sweden"
}
]
}
From that response I get the key and store it in my database table.
My problem
I also want to to the opposite, and get the "name" & "subtext" by providing the "key". You know, "give me the information where key = 220260543".
I know i could store the name and subtext in my database to, but i prefer just to keep the key.
Anyone knows if this is possible? How? Links? I've read the facebook development doc's but haven't found anything yet.
According to Facebook's documentation your query is only used for doing auto-complete within the ads API. The key is only specific to a country as well. There is nothing in their documentation showing us devs how to go backwards from the key to the city. There appears to be no FQL table for cities that has a key column. And the graph is still bare bones and has even less.