Graph API Version

Media Fingerprint

Reading

Media fingerprint

Example

Graph API Explorer
GET /v2.11/{media-fingerprint-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(
    '/{media-fingerprint-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(
    "/{media-fingerprint-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{media-fingerprint-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:@"/{media-fingerprint-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

Media fingerprint ID

duration_in_sec

float

The length of the fingerprinted content, in seconds

fingerprint_content_type

enum

Media fingerprint content type

fingerprint_type

enum

The fingerprint type

metadata

FingerprintMetadata

The metadata associated with the fingerprinted content

title

string

The title of the fingerprinted content

universal_content_id

string

A unique code user can use to manage fingerprint. For example: International Standard Recording Code for songtracks. This is for your own use; Facebook will not use this data.

Edges

No edges

Creating

Example

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

Parameters

NameDescription
fingerprint_content_type
enum {SONGTRACK, EPISODE, OTHER, MOVIE, AM_SONGTRACK}

Media fingerprint content type

Required
metadata
array

The fingerprint metadata, for example: metadata={'episode':'newEpisodeVal','season':'newSeasonVal'}

Required
album
string

Album name of a songtrack. This is a required metadata field for SONGTRACK content type.

artist
string

Artist name of a songtrack. This is a required metadata field for SONGTRACK content type.

episode
string

Episode name of an episode. This is a required metadata field for EPISODE content type.

season
string

Season name of an episode. This is a required metadata field for EPISODE content type.

description
string

Description of fingerprint. This is a required metadata field for MOVIE and OTHER content type.

source
string

The location of the media file, e.g /home/media/sample.mp4

Required
title
string

Media title

Required
universal_content_id
string

A unique code user can use to manage fingerprint. For example: International Standard Recording Code for songtracks. This is for your own use; Facebook will not use this data.

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
100Invalid parameter

Updating

Example

You can update a MediaFingerprint by making a POST request to /{media_fingerprint_id}.

Parameters

NameDescription
metadata
array

The fingerprint metadata, for example: metadata={'episode':'newEpisodeVal','season':'newSeasonVal'}

album
string

Album name of a songtrack. This is a required metadata field for SONGTRACK content type.

artist
string

Artist name of a songtrack. This is a required metadata field for SONGTRACK content type.

episode
string

Episode name of an episode. This is a required metadata field for EPISODE content type.

season
string

Season name of an episode. This is a required metadata field for EPISODE content type.

description
string

Description of fingerprint. This is a required metadata field for MOVIE and OTHER content type.

title
string

The title of the media content

universal_content_id
string

A unique code user can use to manage fingerprint. For example: International Standard Recording Code for songtracks. This is for your own use; Facebook will not use this data.

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

Example

You can delete a MediaFingerprint by making a DELETE request to /{media_fingerprint_id}.

Parameters

This endpoint doesn't have any parameters.

Return Type

Struct {
success: bool,
}