Erick Brown
Erick Brown

Reputation: 617

Ads Targeting & Facebook Ads API

I am submitting the following target criteria:

{countries":["US"],
"cities":{"name":"Gilbert, AZ"},
"zips":[],
"regions":[],
"radius":0,
"locals":null,
"keywords":[],
"user_adclusters":[],
"interested_in":null,
"genders":null,
"age_min":25,
"age_max":0}

The error I'm getting back is:

(Exception - #0) Invalid Cities.

Can someone help me?

Thanks! Eric

Upvotes: 0

Views: 638

Answers (1)

Igy
Igy

Reputation: 43816

Try including the ID of the city too:

(the 'key' you get back from the search endpoint)

e.g.

countries":["US"],"cities":[{"id": 2413131,"name":"Gilbert, AZ"},{//SOME OTHER CITY}],"zips":[],"regions":[],"radius":0,"locals":null,"keywords":[],"user_adclusters":[],"interested_in":null,"genders":null,"age_min":25,"age_max":0}

Sometimes supplying the name only doesn't work

Upvotes: 1

Related Questions