I am trying to get a Facebook page posts with count of comments and likes for each post.
For likes there is a parameters I can pass which is summary = true and total_count . I tried this
page_id?fields=posts.limit(1).summary(1)
but nothing comes back.
I can not write FQL as it will be deprecated soon. I am writing php API.
Just go to your page and click on the custom tab that shows the number of likes you have. Here, you'll find the total number of likes and people talking about a page, basic demographics, a graph of the page's popularity over the last month, and your friends who like the page.
Tap in the top right of Facebook. Tap Pages, then go to your Page. Tap More at the top of your Page, then tap Insights. To see more insights or to export insights, log into Facebook from a computer.
No, that is not really possible. Each of your friends would have to sign in to your app and grant it permission to read their likes, and you would need to have valid individual user tokens available for all of them each time you want to request this data, because “A User or Page can only query their own likes.
Click the magnifying glass icon at the upper corner of your screen and enter the name of the Facebook user in the search bar. Choose the “About info” to be directed to the pages that they liked. In the likes section, you will see the pictures, videos and other content that the user liked. Click the “View all”.
You can get total count by passing arguments like
?fields=likes.summary(1),comments.summary(1),
$fbtimeposts = (new FacebookRequest($session, 'GET', "/me/feed?fields=likes.summary(1),comments.summary(1),story,link,comments,likes,source,picture,type,status_type,application,message,message_tags,name,caption,actions,from,feed_targeting,full_picture,description,updated_time,created_time,id,object_id,parent_id,place,story_tags,targeting,with_tags&limit=10&date_format=U&limit=10&date_format=U"))->execute()->getGraphObject()->asArray();
I hope above example helps you in someway!!!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With