Phiên bản API Đồ thị

Ad Asset Promotional Metadata

Đọc

AdAssetPromotionalMetadata

Ví dụ

Graph API Explorer
GET v19.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
}];
Nếu bạn muốn tìm hiểu cách sử dụng API Đồ thị, hãy đọc Hướng dẫn sử dụng API Đồ thị của chúng tôi.

Thông số

Điểm cuối này không có bất kỳ thông số nào.

Trường

Trường thông tinMô tả
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.

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.

Tạo

Bạn không thể thực hiện thao tác này trên điểm cuối này.

Cập nhật

Bạn không thể thực hiện thao tác này trên điểm cuối này.

Xóa

Bạn không thể thực hiện thao tác này trên điểm cuối này.