Get reactions on an object.
View Insights for more information on Page and Post reactions.
This endpoint is supported for New Page Experience.
Marketing Apps
ads_management
pages_read_engagement
pages_show_list
Page Management Apps
pages_show_list
The following example is a GET
request made by a User who has reacted to their own object.
curl -i -X GET \
"https://graph.facebook.com/your-post-id/reactions?access_token=your-user-access-token"
{ "data": [ { "id": "your-user-id", "name": "Your Name", "type": "HAHA" } ], "paging": { "cursors": { "before": "QVFIUk5YbXFFbG8yVWVOa2w0ZAGhmSUNKMkZAZAOXZARbzJOMHM0TUFtZAnhJbWdPdkF4OURUTHJrQjFqQ2RQZAVN1UGxSVU5FWURENnE4OUFPeXFreU1jV09pdFJR", "after": "QVFIUkpsWVRkcVl6SlhsdWlrcGdudl8xVEhwVEJ5ZA3FXdG90bTRxam13NmJDUGpQVnB5ZA29lMG9FVmFaeU1BLW1hc2oZD" } } }
If the User or Page has not reacted to the object being queried, data
will be empty.
The following example is a GET
request for the total reactions to an object.
curl -i -X GET \
"https://graph.facebook.com/your-post-id
?fields=reactions.summary(total_count)
&access_token=your-access-token"
The JSON Response if the User or Page has reacted to their own object.
{ "reactions": { "data": [ { "id": "your-user-id", "name": "Your Name", "type": "HAHA" } ], "paging": { "cursors": { "before": "QVFIUk5YbXFFbG8yVWVOa2w0ZAGhmSUNKMkZAZAOXZARbzJOMHM0TUFtZAnhJbWdPdkF4OURUTHJrQjFqQ2RQZAVN1UGxSVU5FWURENnE4OUFPeXFreU1jV09pdFJR", "after": "QVFIUkpsWVRkcVl6SlhsdWlrcGdudl8xVEhwVEJ5ZA3FXdG90bTRxam13NmJDUGpQVnB5ZA29lMG9FVmFaeU1BLW1hc2oZD" } }, "summary": { "total_count": 28 } }, "id": "your-post-id" }
The JSON Response if the User or Page has not reacted to their own object.
{ "reactions": { "data": [ ], "paging": { "cursors": { "before": "QVFIUk5YbXFFbG8yVWVOa2w0ZAGhmSUNKMkZAZAOXZARbzJOMHM0TUFtZAnhJbWdPdkF4OURUTHJrQjFqQ2RQZAVN1UGxSVU5FWURENnE4OUFPeXFreU1jV09pdFJR", "after": "QVFIUkpsWVRkcVl6SlhsdWlrcGdudl8xVEhwVEJ5ZA3FXdG90bTRxam13NmJDUGpQVnB5ZA29lMG9FVmFaeU1BLW1hc2oZD" } }, "summary": { "total_count": 28 } }, "id": "your-post-id" }
A User or Page can only query their own reactions. Other Users' or Pages' reactions are unavailable due to privacy concerns.
The "like" reaction counts include both "like" and "care" reactions.
Name | Description |
---|---|
enum {NONE, LIKE, LOVE, WOW, HAHA, SORRY, ANGRY} | The type of reaction a Page or User marked an object. |
Reading from this edge will return a JSON formatted result
{ "data": [], "paging": {}, "summary": {} }
data
The Profile of the Page or User running the query, if the object being queried was reacted to by the Page or User, and a list of reaction types:
Field | Description |
---|---|
enum {NONE, LIKE, LOVE, WOW, HAHA, SORRY, ANGRY} | The type of reaction a Page or User marked an object. |
For reactions on Posts, this edge does not return a Profile except for the current user, if read with a user access token.
curl -i -X GET \
"https://graph.facebook.com/your-object-id
?fields=reactions.type(LOVE).limit(0).summary(total_count)
&access_token=your-access-token"
{ "reactions": { "data": [ ], "summary": { "total_count": 3498 } }, "id": "your-object-id" }
paging
For more details about pagination, see the Graph API's paging documentation. Adding limit(0)
to reactions
will remove paging
from the output.
summary
Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=total_count
).
Field | Description |
---|---|
unsigned int32 | Total number of reactions |
enum {NONE, LIKE, LOVE, WOW, HAHA, SORRY, ANGRY} | The type of reaction a Page or User marked an object. |
Error | Description |
---|---|
100 | Invalid parameter |
This operation is not supported.
This operation is not supported.
This operation is not supported.