In VK there is api - https://vk.com/dev/likes.getList

That is, on the site.ru/asd page puts a like, then I make a request to VC and see who set.

I need the same thing, only for fb, I can not find api.

That is, you need an apf fb, in which a link to the page where you like was sent and the list of those who put it is returned.

  • You wrote that the link to the page is sent, is it a type page - a public page or a page where there is ONE post? - SkiesX

1 answer 1

The FB API is not like VK.

Facebook has different id for all types of entries, so to access any functionality you need to know the id of the entry and the name of the desired API function. In a particular case, you are interested in the /likes method.

An example of getting a list of those who liked:

 GET https://graph.facebook.com/v2.5/{id того, кто запостил}_{здесь_указываем_id_записи}/likes 

An example of getting a list of those who liked the number of likes from the post on my page (this is a real example, only without access_token):

 https://graph.facebook.com/v2.5/963586523696776_963070623748366/likes?summary=true 

The answer is:

 { "data": [ { "id": "963586523696776" } ], "paging": { "cursors": { "after": "OTYzNTg2NTIzNjk2Nzc2", "before": "OTYzNTg2NTIzNjk2Nzc2" } }, "summary": { "total_count": 1, "can_like": true, "has_liked": true } } 

summary=true is responsible for counting the number of likes. If you do not specify it, then fb will simply send a list of people who liked the entry.

  • I do not know the record id, nor the one who posted it. Only page url. - Oleg
  • @exec, your question was first written down differently, or what I misled - Umed
  • Apparently I could not correctly describe. Total, how to solve the problem? In VK, I send app_id and hash links, which I send on the page. In FB in the widget, I send the link completely. So I found this - api.facebook.com/ ... but it shows the number of likes, and I need exactly those (one) who have liked. - Oleg
  • @exec, now I will try to think of something - Umed
  • so how Happened? - Oleg