Facebook
Graph API Reference v20.0: Page Post Reactions - Documentation - Meta for Developers
Graph API Version

Page Post Reactions

Reading

Reactions for this object

New Page Experience

This endpoint is supported for New Page Experience .

Feature Permissions

Name Description
Page Public Content Access This feature permission may be required.

Example

Graph API Explorer
 GET /v20.0/{page-post-id}/reactions 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-post-id}/reactions',
    '{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-post-id}/reactions",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
); 
 /* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-post-id}/reactions",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync(); 
 /* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{page-post-id}/reactions"
                                      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

Parameter Description
type
enum {NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL, PRIDE, CARE, FIRE, HUNDRED}

Reaction type

Fields

Reading from this edge will return a JSON formatted result:

 

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

data

A list of Profile nodes.

The following fields will be added to each node that is returned:

Field Description
type
enum {NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL, PRIDE, CARE, FIRE, HUNDRED}

The reaction type

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=total_count ).

Field Description
total_count
unsigned int32

Total number of reactions

viewer_reaction
enum {NONE, LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL, PRIDE, CARE, FIRE, HUNDRED}

The viewer's reaction

Error Codes

Error Description
100 Invalid parameter
190 Invalid OAuth 2.0 Access Token
368 The action attempted has been deemed abusive or is otherwise disallowed
104 Incorrect signature
200 Permissions error
80001 There have been too many calls to this Page account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting.
2500 Error parsing graph query

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.
Design a Mobile Website
View Site in Mobile | Classic
Share by: