user3352263
user3352263

Reputation: 49

Facebook api likes

I need to know if that's possible using the Facebook API?

  1. Get everyone that liked my page (Less than 50 people)
  2. Get all the pages they liked
  3. Query to see if any of the people that liked my page liked my competitor page as well?

thanks,

Upvotes: 1

Views: 889

Answers (2)

Facebook dismiss FQL after 8 Augsut 2016 Now you need to use only Graph API.

Upvotes: 0

林果皞
林果皞

Reputation: 7793

Answer:

  1. No way. Reference: graph api - retrieve list of likes of a page

  2. Request https://graph.facebook.com/{user-id}/likes endpoint. Documentation: https://developers.facebook.com/docs/graph-api/reference/user/likes/

  3. Request https://graph.facebook.com/{user-id}/likes/{page-id} endpoint. Documentation: https://developers.facebook.com/docs/graph-api/reference/user/likes/

3.1 Request FQL to check multiple userid in only one API call, for example, if one of the user id from the list (e.g. 4,5,12345,777) have liked the page, it would return the relevant user id, i.e. 12345 as shown in this screenshot.

SELECT uid FROM page_fan WHERE page_id = 279183048899677 AND uid In (4,5,12345,777)

enter image description here

Documentation: https://developers.facebook.com/docs/reference/fql/page_fan/

Upvotes: 3

Related Questions