Version API du graphe

Ad Asset Promotional Metadata

Lecture

AdAssetPromotionalMetadata

Exemple

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
}];
Pour apprendre à utiliser l’API Graph, consultez notre guide Utiliser l’API Graph.

Paramètres

Ce point de terminaison n’a aucun paramètre.

Champs

ChampDescription
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.

Création

Vous ne pouvez pas effectuer cette opération sur ce point de terminaison.

Mise à jour

Vous ne pouvez pas effectuer cette opération sur ce point de terminaison.

Suppression

Vous ne pouvez pas effectuer cette opération sur ce point de terminaison.