圖形 API 版本

Ad Asset Promotional Metadata

閱讀中

AdAssetPromotionalMetadata

範例

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
}];
如果想瞭解如何使用圖形 API,請參閱我們的使用圖形 API 指南

參數

這個端點沒有任何參數。

欄位

欄位說明
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.

建立中

你無法在此端點執行此操作。

更新中

你無法在此端點執行此操作。

刪除中

你無法在此端點執行此操作。