Versão Graph API

Ad Account Saved Audiences

Leitura

saved audiences

Exemplo

Graph API Explorer
GET /v19.0/{ad-account-id}/saved_audiences HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{ad-account-id}/saved_audiences',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{ad-account-id}/saved_audiences",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{ad-account-id}/saved_audiences",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{ad-account-id}/saved_audiences"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Se quiser saber como usar a Graph API, leia nosso guia sobre Como usar a Graph API.

Parâmetros

ParâmetroDescrição
business_id
numeric string or integer

optional param assist with filters such as recently used

fields
list<string>

Fields to be retrieved. Default behavior is to return only the ids.

filtering
list<Filter Object>

Filters on the report data. This parameter is an array of filter objects.

field
string

Obrigatório
operator
enum {EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL, IN_RANGE, NOT_IN_RANGE, CONTAIN, NOT_CONTAIN, IN, NOT_IN, STARTS_WITH, ENDS_WITH, ANY, ALL, AFTER, BEFORE, ON_OR_AFTER, ON_OR_BEFORE, NONE, TOP}

Obrigatório
value
string

Obrigatório

Campos

A leitura desta borda retornará um resultado formatado em JSON:

{ "data": [], "paging": {} }

data

Uma lista de nós SavedAudience.

paging

Para saber mais detalhes sobre paginação, consulte o Guia da Graph API.

Error Codes

ErroDescrição
100Invalid parameter
190Invalid OAuth 2.0 Access Token
200Permissions error

Criando

Não é possível executar esta operação neste ponto de extremidade.

Atualizando

Não é possível executar esta operação neste ponto de extremidade.

Excluindo

Não é possível executar esta operação neste ponto de extremidade.