How to get form fields in Facebook Lead Ads API?

后端 未结 2 2000
长情又很酷
长情又很酷 2021-02-09 17:31

I\'m using Facebook Lead Ads API. I need to retrieve all fields from a form by ID. I know I can:

  • get all forms by calling //leadgen_forms
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-09 18:18

    You can get these by adding non-default field qualifiers, so the url becomes /?fields=id,name,qualifiers.

    I haven't found it anywhere in the official docs though. But it is quite common for new FB features to be poorly documented.

    Example output

    {
      "id": "1234567890000",
      "name": "test form",
      "qualifiers": [
        {
          "field_key": "first_name",
          "label": "First Name",
          "question": "First name",
          "id": "777888999000111"
        },
        {
          "field_key": "last_name",
          "label": "Last Name",
          "question": "Last name",
          "id": "111222333444555"
        }
      ]
    }
    

提交回复
热议问题