How to get most popular posts on facebook page using graphical API

I wanted to get the most popular posts on a facebook page using the Graph API. I tried https://graph.facebook.com/%pageId%/posts but with this API I get the latest posts from the page. I wanted to filter the result using the most popular posts (i.e. Most Common, Favorite, and Comments). Can any body help me learn how to get popular posts on a page using the graphical API.

Thank you, Shiv.

+3


source to share


2 answers


You cannot get popular posts directly from the Facebook Graph API. You can receive posts using the Graph API (/ {page-id} / posts) , then count the likes, generals, or comments of the post yourself (/ {post-id} / likes, / {post-id} / comments, / {post -id} / sharedposts) and then sorts all posts.

Literature:



1. https://developers.facebook.com/docs/graph-api/reference/v2.3/object/comments 2. https://developers.facebook.com/docs/graph-api/reference/v2.3 / object / likes 3.https : //developers.facebook.com/docs/graph-api/reference/v2.3/object/sharedposts

+3


source


There is a "bug" in the documentation that says it is currently not possible to find out which popular URLs in your domain are through FQL or the Graph API. I don't think this is the case as FB claims the API is more robust than the toolbar.



-3


source







All Articles