I want to run the following search query using Facebook Graph API
“pages liked by people who like microsoft”
I can run this query from within facebook. Is it possible to retrieve the same information using the Graph API?
Thank You.
I want to run the following search query using Facebook Graph API
“pages liked by people who like microsoft”
I can run this query from within facebook. Is it possible to retrieve the same information using the Graph API?
Thank You.
2
Answers
No, there is no way. You can only search for people by name with the Graph API.
Docs: https://developers.facebook.com/docs/graph-api/using-graph-api#search
I agree with everybody that there is no direct way of checking whether a particular user has liked a certain page or not using FB Graph API.
But i believe there is a workaround for this and you can try to hit the below URL in your browser
It will return all the people information who have liked the page provided. I am not sure would this return all the results or just some of them. But i believe you can try this.
You can then do some web scraping which will help you indentify whether ‘person A’ has liked a page say ‘abc’.
Now you can hit the below endpoint to retreive all the likes this ‘person a’ has liked
But please note that you need user_likes permission to retrieve someone else’s likes
Let me know if this worked for you.