[Python] Facebook ads 1487478 error: “Invalid Geo Locations”

Discussão em 'Python' iniciado por Stack, Março 9, 2025.

  1. Stack

    Stack Membro Participativo

    I'm running into an "Invalid Geo Locations" error when creating an adgroup through Facebook Ads API. I'm using the Python SDK. Here is what I'm sending in the body:

    campaign_group_id=xxxxxxx&targeting={"geo_locations":{"custom_locations":[{"distance_unit":"kilometer","latitude":35.933333,"longitude":0.083333,"radius":50}]},"interests":[{"id":"6003252179711","name":"Engineering"}]}&name=My Adset&bid_info={"ACTIONS":50}&end_time=4/20/2015&bid_type=CPA&campaign_status=ACTIVE&daily_budget=100


    And here is the message I get from the API:

    {u'is_transient': False, u'error_subcode': 1487478, u'error_user_title': u'Invalid Geo Locations', u'error_data': {u'blame_field': u'targeting'}, u'error_user_msg': u'Invalid Geo Locations', u'code': 100, u'message': u'Invalid parameter', u'type': u'FacebookApiException'}


    I don't see what's wrong with my targeting spec. Any idea?

    Thanks!

    Continue reading...

Compartilhe esta Página