I'm looking to see if it's possible to pull data from individual posts; listed below. I'm looking to pull this data daily for a business page. From the daily data I want to make a weekly report comparing the last weeks set of data.
The data I'm looking to get is:
Activity / How many times was each indidual post viewed
Posts that lead to a subscription / like
Posts that lead to unsubscribe / unlike
The number of people that have hidden an individual post
Facebook provides api access to the Insights of a page (or application).
You have two ways to access it: the Insights object or the Insights fql table.
Using that you can load statistics about your page using specific metrics, in the fql table doc. the ones that you care about (based on your question) starts in Page Posts and then you have Stories and People talking about this, Impressions and Engagement.
According to the fql table doc:
To read insights you need
read_insights permissions for all apps, Pages and domains owned by the current session user
Which means that you won't be able to just run a program once a day to collect this data since you'll need an active token for a user that has access to the insights data for the page and has authorized your app and granted the "read_insights" permission.
You can make sure that the user use your app while you authenticate him using the Server-Side auth flow, which will results in 60 days token, save that and you can run that program daily for the next 60 days.
When the token has expired the user will have to again use your app to authenticate and create a new valid token.
Related
Is there any graph API which gives a page's followers detail?If not is there any alternative?I have a Facebook page and i wanted to collect my followers data(user interests,shares etc)
I have tried graph APIs but it gives single users data only.it doest give page followers data unless and untill we know their userids.No way to collect that also.
You cannot access your page follower's data like that, especially not if you refer to followers (compared to fans, which are two different things/objects).
Do do this it would require the user explicitly granting your app the permission to access that info first, but data you mention (user interests for example) had been deprecated and cannot be accessed via the API anymore.
I'm working on a project where an app displays events in the near surrounding based on the personal preferences of the user. We plan on getting the events from the Facebook Graph API using this approach. Due to Facebook's API changes it is much more complicated to search for events in a particular city. Therefore it requires much more API calls than before and i'm worried about FB rate limit.
We want to get the information about events by calling the Graph API with our app access token from our server and then store the data temporarily in our own database. So every time a user searches for events in our app, the client gets the information from our database. Moreover the user can (but don't has to) log-in with his Facebook account in order to provide us more information about him. We want to use the user's access token to call the API in order to get the user's likes.
I've read the FB documentation about the rate limits and some posts here on the site. Apparently FB calculates the number of calls based on the active users (200 calls per user every hour). It says that
"These limits apply to calls made using any access token other than a
page access token"
ergo they also apply to the app access token. Additionally in the FB policy it says something about 100M calls per day.
So my questions are:
How does the rate limit work on a per user basis if I am using my App Access Token?
To what token does the "100M" number belong? Is it an overall number for all tokens used by the app?
A similiar question has been posted here some time ago but didn't receive any answers. I hope maybe someone got new information since then. An answer to these questions is crucial to our project, so bear with me if you've read that question before.
Thanks in advance!
Please check this
Facebook Rate Limits
I've seen many posts around most of them are about pages or with outdated information.
I need to collect the feed (let's say last 10 posts: title + content) of 2 different Facebook groups in real-time (or almost) possibly in JSON in order to get real-time notifications about new posts (e.g. via kimonolabs service, but any other solution is accepted).
How do to that?
There are no realtime updates for groups. You would need to get the feed on your own - with a Cron Job, for example.
Be aware that you can only get access to groups you manage, with the user_managed_groups permission and the /group-id/feed endpoint.
Check out the API reference for example code and all the information you need: https://developers.facebook.com/docs/graph-api/reference/v2.4/group
I am developing a page on my site that pulls in analytics data from Facebook posts and pages, and have began with trying out the PHP SDK for Facebook.
The documentation seems to have improved in the last few months since the last time I used it, but as there is so much going on, I find it difficult to find the exact answer to my questions sometimes.
I want to get the analytics data for a number of posts and pages which are not necessarily related to each other... and also want to do this without logging in via Facebook. Is there some sort of simple API key I can use, which skips the logging in stage? I want a number of different peple to go to the site and see info from a number of different posts and pages.
Hope this makes sense.
You'll be able to get limited data from public pages and posts without logging in. Data includes number of likes, public page information, comment and likes on posts etc.
For example, if I look at the following Page https://graph.facebook.com/thetimberyard, I can see various stats like:
checkins
talking_about_count
were_here_count
likes
However, you can get better insights if you ask the user to login with read_insights permission. This permission will give you access to full insights for pages you own. Extra insights include (but not limited to):
Daily New Likes
Daily Unlikes
Daily Non/Logged-in Page Views
Weekly Non/Logged-in Page Views
Daily Internal Referrers
Daily External Referrers
Daily/Weekly/Monthly People Talking About This
Daily/Weekly/Monthly Reach Demographics, etc.
I would like to get number of impressions for someone else's (not mine) facebook page. Is it possible via graph or FQL api or any other means without having administrative access to the page?
No. From the insights api documentation -
Without a session, an application can retrieve only its own metrics. With a user session, it is possible to retrieve data for all applications, pages, and domains owned by the session user. Reading this data requires the read_insights permission.
Facebook API link - http://developers.facebook.com/docs/reference/api/insights/