R
R
Reserford19012018-03-26 17:33:05
Facebook
Reserford1901, 2018-03-26 17:33:05

Getting a list of audiences by user ID?

Hello.
Faced a problem when working with facebook-php-ads-sdk
It is possible to get a list of Custom Audiences using this api:

public function getCustomAudiences(array $fields = array(), array $params = array(), $pending = false) {
$this->assureId();

    $param_types = array(
      'business_id' => 'string',
      'fields' => 'list<fields_enum>',
      'filtering' => 'list<Object>',
      'pixel_id' => 'string',
    );
    $enums = array(
      'fields_enum' => CustomAudienceFieldsValues::getInstance()->getValues(),
    );

    $request = new ApiRequest(
      $this->api,
      $this->data['id'],
      RequestInterface::METHOD_GET,
      '/customaudiences',
      new CustomAudience(),
      'EDGE',
      CustomAudience::getFieldsEnum()->getValues(),
      new TypeChecker($param_types, $enums)
    );
    $request->addParams($params);
    $request->addFields($fields);
    return $pending ? $request : $request->execute();
  }

The problem is that I need to get a list of all audiences from the account (Custom + Saved + Lookalike)
Is there any way to do this using API or cURL methods?
5ab9049f09e19903158843.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question