Tiago Martins
Tiago Martins

Reputation: 1976

How to check if user likes a post on facebook with the graph api

I simply want to check if a user has liked a post with facebook graph api.

I tried the following query but it does not work:

me/likes/{post_id}

Am I missing something?

Upvotes: 0

Views: 3503

Answers (2)

HeavyMetal
HeavyMetal

Reputation: 131

You can do using fb graph api 2.4

Adding field likes.summary(true) to your request should do.

Upvotes: 5

andyrandy
andyrandy

Reputation: 73984

It´s not that easy, you would have to go through all likes and search for the user. This is the API call: https://developers.facebook.com/docs/graph-api/reference/v2.2/object/likes#read

Upvotes: 1

Related Questions