When getting a post comments list using POST_ID/comments, each comment contains a Boolean field named “user_likes” that tells me if the user likes the comment or not (this is how i decide which button to display like/unlike).
When getting the list of posts the post itself does not contain this field. I can still post to POST_ID/likes and DELETE to this address to change the like state, but there is no indication of the current state of the like.
Am i missing something? Is there an other way to determine the like state of the post?
You could query the FQL “likes” table for the particular user or the object id in question.
https://developers.facebook.com/docs/reference/fql/like/
Alternatively (I’m guessing you have read_stream permission here) you could query the following table
https://developers.facebook.com/docs/reference/fql/stream/
Using the graph api explorer try running this query
https://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3DSELECT%20post_id%2C%20likes%20FROM%20stream%20where%20source_id%20%3D%20me()
make sure you grant the read_stream permission! There are obviously more fields you could retur as well, and you can replace “me()” with a different user_id, but then you might need to use the app access token