Graph API Version

Page Video Copyright Rules

Reading

Returns the match rules associated with a given page.

Example

Graph API Explorer
GET /v2.11/{page-id}/video_copyright_rules 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(
    '/{page-id}/video_copyright_rules',
    '{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(
    "/{page-id}/video_copyright_rules",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/video_copyright_rules",
    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:@"/{page-id}/video_copyright_rules"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
  • manage_pages
  • pages_show_list
Other Apps
No data

Parameters

NameDescription
selected_rule_id
string

The selected rule id when used in edit dialog

source
enum {RULES_SELECTOR, RULES_TAB}
Default value: RULES_SELECTOR

The source of the api request. Either rule selector or tab

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {}, "summary": {} }

data

A list of VideoCopyrightRule nodes.

paging

For more details about pagination, see the Graph API guide.

summary

Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=version).

FieldDescription

version

int32

Is_new_mental_model_enabled ? 2 : 1

Validation Rules

ErrorDescription
100Invalid parameter

Creating

Example

You can make a POST request to video_copyright_rules edge from the following paths:
When posting to this edge, a VideoCopyrightRule will be created.

Parameters

NameDescription
condition_groups
list<Condition Group>

A list of condition groups that specify conditions for an action.

Required
action
enum {MANUAL_REVIEW, TRACK, BLOCK, MONETIZE}

The action to be performed on a match if any of the conditions pass.

Required
conditions
list<Condition>

A list of conditions to be evaluated.

type
enum {GEO, MONITORING_TYPE, OVERLAP_DURATION, MATCH_OVERLAP_PERCENTAGE, REFERENCE_OVERLAP_PERCENTAGE, PRIVACY, VALIDITY_PERIOD}

The type of condition to be evaluated.

Required
operator
enum {IS, IS_NOT, IN_SET, NOT_IN_SET, LESS_THAN, GREATER_THAN}

The operator for the evaluation, which varies depending on the condition type.

  • CONTENT_TYPE: IS
  • GEO: IN_SET, NOT_IN_SET
  • OVERLAP_DURATION: GREATER_THAN, LESS_THAN
  • Required
    value
    array<string> | int | string

    The value for this condition, which varies depending on the condition type.

  • CONTENT_TYPE: One or more of VIDEO_ONLY, AUDIO_ONLY or VIDEO_AND_AUDIO
  • GEO: A string array of ISO 3166 format country codes
  • OVERLAP_DURATION: An integer representing milliseconds of overlap
  • Required
    name
    string

    The name of the rule, as specified by the user.

    Required

    Return Type

    This endpoint supports read-after-write and will read the node represented by id in the return type.
    Struct {
    id: numeric string,
    }

    Validation Rules

    ErrorDescription
    200Permissions error
    100Invalid parameter

    Updating

    You can't perform this operation on this endpoint.

    Deleting

    You can't perform this operation on this endpoint.