video.rates

An action representing someone rating a movie, TV show, episode or another piece of video content.

Create
/* make the API call */
FB.api(
    "/me/video.rates",
    "POST",
    {
        "rating:value": 3.1415926535,
        "rating:scale": 42,
        "episode": "http:\/\/samples.ogp.me\/335419676534648",
        "movie": "http:\/\/samples.ogp.me\/453907197960619",
        "tv_show": "http:\/\/samples.ogp.me\/413802348663468",
        "other": "http:\/\/samples.ogp.me\/467235199955838"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"rating:value": @3.1415926535,
  @"rating:scale": @42,
  @"episode": @"http://samples.ogp.me/335419676534648",
  @"movie": @"http://samples.ogp.me/453907197960619",
  @"tv_show": @"http://samples.ogp.me/413802348663468",
  @"other": @"http://samples.ogp.me/467235199955838",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/me/video.rates"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Bundle params = new Bundle();
params.putDouble("rating:value", 3.1415926535);
params.putInt("rating:scale", 42);
params.putString("episode", "http://samples.ogp.me/335419676534648");
params.putString("movie", "http://samples.ogp.me/453907197960619");
params.putString("tv_show", "http://samples.ogp.me/413802348663468");
params.putString("other", "http://samples.ogp.me/467235199955838");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/video.rates",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'POST',
  '/me/video.rates',
  array (
    'rating:value' => 3.1415926535,
    'rating:scale' => 42,
    'episode' => 'http://samples.ogp.me/335419676534648',
    'movie' => 'http://samples.ogp.me/453907197960619',
    'tv_show' => 'http://samples.ogp.me/413802348663468',
    'other' => 'http://samples.ogp.me/467235199955838',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
POST /v2.7/me/video.rates HTTP/1.1
Host: graph.facebook.com

rating%3Avalue=3.1415926535&rating%3Ascale=42&episode=http%3A%2F%2Fsamples.ogp.me%2F335419676534648&movie=http%3A%2F%2Fsamples.ogp.me%2F453907197960619&tv_show=http%3A%2F%2Fsamples.ogp.me%2F413802348663468&other=http%3A%2F%2Fsamples.ogp.me%2F467235199955838
curl -X POST \
     -d "rating%3Avalue=3.1415926535&rating%3Ascale=42&episode=http%3A%2F%2Fsamples.ogp.me%2F335419676534648&movie=http%3A%2F%2Fsamples.ogp.me%2F453907197960619&tv_show=http%3A%2F%2Fsamples.ogp.me%2F413802348663468&other=http%3A%2F%2Fsamples.ogp.me%2F467235199955838" \
        https://graph.facebook.com/v2.7/me/video.rates

Request

NameTypeDescription
FIELDS
episodeReferenceAn object representing an episode of a show
is_draftBoolean
languageString
movieReferenceAn object representing a movie
otherReferenceAn object representing any other type of video
ratingRatingA struct describing the rating given to the video
rating:valueFloatThe value of the rating given
rating:scaleIntegerThe highest value possible in the rating scale
rating:normalized_valueFloatDeprecated
review_linkReference
review_textStringThe text content of the review
tv_showReferenceAn object representing a TV show
INHERITED FIELDS
created_timeDateTimeThe time that the action was created
end_timeDateTimeThe time that the user ended
expires_inIntegerThe amount of time from the publish_time that the action will expire
fb:explicitly_sharedBooleanThe user is explicitly sharing this action
messageStringA message attached to this action
no_feed_storyBooleanDo not post this action to the feed
placePlaceThe place that the action took place
refStringA <50 character string identifier for tracking and insights
start_timeDateTimeThe time that the user started
tagsArray<Profile>Any other users that performed the action

Response

NameTypeDescription
idRateA Rate action id
Read
/* make the API call */
FB.api(
    "/me/video.rates",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/me/video.rates"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/video.rates",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/me/video.rates'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
GET /v2.7/me/video.rates HTTP/1.1
Host: graph.facebook.com
curl https://graph.facebook.com/v2.7/me/video.rates

Request

NameTypeDescription
idRateA Rate action id

Response

NameTypeDescription
FIELDS
episodeReferenceAn object representing an episode of a show
is_draftBoolean
languageString
movieReferenceAn object representing a movie
otherReferenceAn object representing any other type of video
ratingRatingA struct describing the rating given to the video
rating:valueFloatThe value of the rating given
rating:scaleIntegerThe highest value possible in the rating scale
rating:normalized_valueFloatDeprecated
review_linkReference
review_textStringThe text content of the review
tv_showReferenceAn object representing a TV show
INHERITED FIELDS
end_timeDateTimeThe time that the user ended
imageArray<ActionImage>
image:urlURL
image:secure_urlURL
image:typeString
image:widthInteger
image:heightInteger
image:altString
image:user_generatedBoolean
messageStringA message attached to this action
no_feed_storyBooleanDo not post this action to the feed
placePlaceThe place that the action took place
publish_timeDateTimeThe time that the action was published
refStringA <50 character string identifier for tracking and insights
start_timeDateTimeThe time that the user started
tagsArray<Profile>Any other users that performed the action
Update
/* make the API call */
FB.api(
    "/id_from_create_call",
    "POST",
    {
        "rating:value": 3.1415926535,
        "rating:scale": 42,
        "episode": "http:\/\/samples.ogp.me\/335419676534648",
        "movie": "http:\/\/samples.ogp.me\/453907197960619",
        "tv_show": "http:\/\/samples.ogp.me\/413802348663468",
        "other": "http:\/\/samples.ogp.me\/467235199955838"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"rating:value": @3.1415926535,
  @"rating:scale": @42,
  @"episode": @"http://samples.ogp.me/335419676534648",
  @"movie": @"http://samples.ogp.me/453907197960619",
  @"tv_show": @"http://samples.ogp.me/413802348663468",
  @"other": @"http://samples.ogp.me/467235199955838",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/id_from_create_call"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
Bundle params = new Bundle();
params.putDouble("rating:value", 3.1415926535);
params.putInt("rating:scale", 42);
params.putString("episode", "http://samples.ogp.me/335419676534648");
params.putString("movie", "http://samples.ogp.me/453907197960619");
params.putString("tv_show", "http://samples.ogp.me/413802348663468");
params.putString("other", "http://samples.ogp.me/467235199955838");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/id_from_create_call",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'POST',
  '/id_from_create_call',
  array (
    'rating:value' => 3.1415926535,
    'rating:scale' => 42,
    'episode' => 'http://samples.ogp.me/335419676534648',
    'movie' => 'http://samples.ogp.me/453907197960619',
    'tv_show' => 'http://samples.ogp.me/413802348663468',
    'other' => 'http://samples.ogp.me/467235199955838',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
POST /v2.7/id_from_create_call HTTP/1.1
Host: graph.facebook.com

rating%3Avalue=3.1415926535&rating%3Ascale=42&episode=http%3A%2F%2Fsamples.ogp.me%2F335419676534648&movie=http%3A%2F%2Fsamples.ogp.me%2F453907197960619&tv_show=http%3A%2F%2Fsamples.ogp.me%2F413802348663468&other=http%3A%2F%2Fsamples.ogp.me%2F467235199955838
curl -X POST \
     -d "rating%3Avalue=3.1415926535&rating%3Ascale=42&episode=http%3A%2F%2Fsamples.ogp.me%2F335419676534648&movie=http%3A%2F%2Fsamples.ogp.me%2F453907197960619&tv_show=http%3A%2F%2Fsamples.ogp.me%2F413802348663468&other=http%3A%2F%2Fsamples.ogp.me%2F467235199955838" \
        https://graph.facebook.com/v2.7/id_from_create_call

Request

NameTypeDescription
FIELDS
episodeReferenceAn object representing an episode of a show
is_draftBoolean
languageString
movieReferenceAn object representing a movie
otherReferenceAn object representing any other type of video
ratingRatingA struct describing the rating given to the video
rating:valueFloatThe value of the rating given
rating:scaleIntegerThe highest value possible in the rating scale
rating:normalized_valueFloatDeprecated
review_linkReference
review_textStringThe text content of the review
tv_showReferenceAn object representing a TV show
INHERITED FIELDS
end_timeDateTimeThe time that the user ended
expires_inIntegerThe amount of time from the publish_time that the action will expire
messageStringA message attached to this action
placePlaceThe place that the action took place
refStringA <50 character string identifier for tracking and insights
tagsArray<Profile>Any other users that performed the action

Response

NameTypeDescription
idRateA Rate action id
Delete
/* make the API call */
FB.api(
    "/id_from_create_call",
    "DELETE",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/id_from_create_call"
                                      parameters:params
                                      HTTPMethod:@"DELETE"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/id_from_create_call",
    null,
    HttpMethod.DELETE,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'DELETE',
  '/id_from_create_call'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
DELETE /v2.7/id_from_create_call HTTP/1.1
Host: graph.facebook.com
curl -X DELETE \
     -d "" \
        https://graph.facebook.com/v2.7/id_from_create_call

Request

NameTypeDescription
idRateA Rate action id

Response

If successful, returns boolean true
true
If not successful, returns an error JSON object
{
  "error":
  {
    "message":ERROR_MESSAGE,
    "type":ERROR_TYPE,
    "code":ERROR_CODE
  }
}