API Graph versión

Ad Asset Promotional Metadata

Lectura

AdAssetPromotionalMetadata

Ejemplo

Graph API Explorer
GET v21.0/...?fields={fieldname_of_type_AdAssetPromotionalMetadata} 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(
    '...?fields={fieldname_of_type_AdAssetPromotionalMetadata}',
    '{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(
    "...?fields={fieldname_of_type_AdAssetPromotionalMetadata}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "...?fields={fieldname_of_type_AdAssetPromotionalMetadata}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"...?fields={fieldname_of_type_AdAssetPromotionalMetadata}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Si quieres obtener información sobre cómo usar la API Graph, lee nuestra guía de uso de la API Graph.

Parámetros

Este extremo no tiene ningún parámetro.

Campos

CampoDescripción
allowed_coupon_code_sources
list<enum>

Options:

1) [AD_CREATIVE_PRIMARY_TEXT] : code specified in manual_coupon_codes is from primary text

2) [AD_CREATIVE_MANUAL_COUPON_CODES] : code specified in manual_coupon_codes is not found from any text of the ad

3) [DETECTED_FROM_MERCHANT_ADS, PROVIDED_BY_MERCHANT, DETECTED_FROM_MERCHANT_WEBSITE] : no need to specify any code in manual_coupon_codes. The code with highest quality will be automatically be chosen. A list of Meta sourced codes can be found from Page's "available_promo_offer_ids" field.

coupon_codes
AdAssetPromotionalMetadataCouponCodes

The coupon codes by sources that the advertiser opted-in to.

manual_coupon_codes
list<string>

Specify up to 1 code in the list.

A code must contain at least two letters, and only contain letters, numbers, dashes and underscores.

Creación

No puedes realizar esta operación en este extremo.

Actualizando

No puedes realizar esta operación en este extremo.

Eliminando

No puedes realizar esta operación en este extremo.