Reputation: 557
I want to get a number of posts from a page in last month. Is is possible with facebook graph API? Also FYI, i just have the access_token to interact with the Facebook API.
Also do anyone knows how to fetch the number of Page mentions in last month?
Thanks for your help in advance.
Upvotes: 3
Views: 16386
Reputation: 1677
Try using Facebook's Page Insights using Facebook Graph API's :
https://developers.facebook.com/docs/graph-api/reference/insights/#page_posts
But please note that you need to be a page admin for this page, and you need to acquire a Page Access Token with the permissions 'read_insights'.
If you are not a page admin, then you can also do the same with an User Access Token or an App Access Token.
Steps:
https://graph.facebook.com/{page-id}/posts
and issue a reuquest.postsCount = postsCount + {the posts json array size}
.{the posts json array size} > 0
, then goto step 3.Notes:
summary(true)
annotation (https://graph.facebook.com/{page-id}?fields=posts.summary(true)
) that you can use, but I couldn't get it working.So, the moral of the story is that I am not sure if Facebook really wants you to crawl its Pages if you are not the Admin of the page. :-)
Upvotes: 8