Graph API Version

Canvas Product Set

Reading

A product set inside the canvas

Examples

Graph API Explorer
GET /v2.9/{canvas-product-set-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{canvas-product-set-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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

The id of the element

bottom_padding

numeric string

The padding below the element

element_type

enum

The type of the element

max_products

unsigned int32

Maximum number of products to show

name

string

The name of the element

product_set_id

numeric string

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

top_padding

numeric string

The padding above the element

Edges

No edges

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

max_items
int64

Maximum number of products to show

name
string

Name of the product set element

product_set_id
id

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

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,
}

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