Graph API Version

Canvas Product Set

Reading

A product set inside the canvas.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
No data
Other Apps
Permissions are not usually requested.

Example

Graph API Explorer
GET /v2.12/{canvas-product-set-id} 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(
    '/{canvas-product-set-id}',
    '{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(
    "/{canvas-product-set-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{canvas-product-set-id}",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{canvas-product-set-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

This endpoint doesn't have any parameters.

Fields

FieldDescription
id
numeric string

id

bottom_padding
numeric string

bottom_padding

element_group_key
string

element_group_key

element_type
enum

element_type

item_description
string

A token to represent which field from the product to show in the product description

item_headline
string

A token to represent which field from the product to show in the product headline

max_products
unsigned int32

Maximum number of products to show

name
string

name

product_set_id
numeric string

The product set id which contains a subset of products within a product catalog

retailer_item_ids
string

An array of items that should be shown first in the product set element. If this is not set then products will be dynamically chosen

show_in_feed
bool

A flag that products should be shown in feed unit

top_padding
numeric string

top_padding

Edges

No edges

Validation Rules

ErrorDescription
100Invalid parameter

Creating

You can't perform this operation on this endpoint.

Updating

You can update a CanvasProductSet by making a POST request to /{canvas_product_set_id}.

Parameters

NameDescription
bottom_padding
float

The padding below the product set

item_description
string

A token to represent which field from the product to show in the product description

item_headline
string

A token to represent which field from the product to show in the product headline

max_items
int64

Maximum number of products to show

name
string

Name of the product set element

product_set_id
product_set ID

The product set id which contains a subset of products within a product catalog

retailer_item_ids
array<string>

An array of items that should be shown first in the product set element. If this is not set then products will be dynamically chosen

show_in_feed
boolean

A flag that products should be shown in feed unit

top_padding
float

The padding above the product set

Return Type

This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter

Deleting

You can delete a CanvasProductSet by making a DELETE request to /{canvas_product_set_id}.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}

Validation Rules

ErrorDescription
100Invalid parameter