Facebook Graph API like history for page - facebook

I have the following question. is it possible to generate a query with the Facebook Graph Explorer which allows a history of the likes per month, but in a longer period of time than with Insights.
Like:
2014 January = 200 Like Count | 2014 February = 195 Like Count | 2014 March = 195 Like Count and so on
Or is there a good software solution for such analyses?
for information:
I am the site owner.
Best regards and thanks in advance!
Benjamin

Since you are the Page Owner, you can use Page Insights: https://developers.facebook.com/docs/graph-api/reference/page/insights/
page_fans would be the metric you want to use. It may be possible to get a longer period than with the Insights UI. If not, then there is no way to get data that old.

Related

Get a page's average number of posts / day using Facebook API?

I'm trying to figure out a way to calculate a Facebook page's average number of posts per day using the API. The problem is that the API does not show when the page was created. Instead, I'm downloading all the posts and using the oldest post as some sort of creation date (which is not 100 percent correct...).
The problem is when a page adds backdated posts. For instance, someone might post a picture in 2012 that's dated 2008. Then that post will be oldest, even if the page hasn't existed that long.
One solution is to go by the updated_time field instead of created_time, but it's not a great solution that still may not be correct.
Is there someway to get around this?
Sorry if this question has come up before, but I couldn't find anything on it.
Unfortunately what you're looking for isn't possible using the API.
For a given post two dates are returned - created_time and updated_time.
As you rightly pointed out the created_time can be updated to add a post in the past.
updated_time also will not work for you as this gets updated whenever someone comments on a post.
https://developers.facebook.com/docs/graph-api/reference/v2.3/post

Facebook Graph API /{page-id}/posts limiting to 600 posts per year

While fetching all the posts for 2014 for a few news companies I noticed that the posts seem to cut off at a certain date and jump to the next year.
For example, I am requesting the posts with the following:
https://graph.facebook.com/v2.2/5823419603/posts?limit=100&date_format=U&include_hidden=true&access_token=XXXX
Then using Pagination to go back in time to the previous (and so on and so fourth)
What I see is the following summarization:
2015_week_10: 196 Posts
2015_week_09: 232 Posts
2015_week_08: 169 Posts
Total Posts: 597
And then to my surprise, the next entry jumps to 2014 (missing a few weeks of 2015)
2014_week_53: 115 Posts
2014_week_52: 216 Posts
2014_week_51: 235 Posts
2014_week_50: 32 Posts
Total Posts: 598 Posts
And then again, a jump to 2013
2013_week_53: 57 Posts
2013_week_52: 95 Posts
2013_week_51: 145 Posts
2013_week_50: 170 Posts
2013_week_49: 130 Posts
Total Posts: 597
It stretches out a bit further in 2012 and I get 594 posts between weeks 41 and 53
then in 2011 I get 601 posts between week 6 (Almost made it!) and week 53
I ran this test on a secondary Facebook Page (100362243341518) and got similar results:
599 posts in 2014, 587 in 2013, 599 in 2012 and 600 in 2011
Manually "loading more" in the Facebook Web UI allows me to see that there are posts in the missing time frames. Insights access to some pages with this issue shows me that there are Impressions on a posts during the missing time frame.
I have scoured the documentation on the Facebook page here but found nothing. There is a mention that the Limit param is upper bounded to 250, but that is per result set, not total (as evidenced by my thousand or so Facebook post pull)
I have looked at numerous StackOverflow articles, and blog articles online, and no one seems to be mentioning anything like this.
I have run this test with both the /posts and /feed edge with the same results.
I have saved the raw CSV files for these posts if someone wanted to look at them let me know, but you will see the same thing that I am noticing.
I am at a complete loss as to why all the posts are not showing up in the API. Does anyone have some insight on the matter?
This was confirmed as a bug by Facebook, and resolved. Facebook will be rolling out the fix to all pages.
Shireesh Asthana · · Facebook Team
Hi Jason,
We're in the process of slowly rolling out the fix. We've added the page you provided to the fix. We'll roll it out more openly in the coming weeks. Thanks for the update! Let us know if you have additional questions.
March 23 at 4:29pm ·
See here for more details:
https://developers.facebook.com/bugs/1624654314422095

Getting the number of Facebook likes for a URL

I know there are several related answers on SO, but none seem to answer my question.
I would like to know if there is way to get the number of likes for a URL, using Graph API 2.2.
I know how to obtain this info via FQL or REST API, but those are deprecated.
https://graph.facebook.com/?ids=some_url
This returns the number of "shares", which is a total of like + shares + whatever. I need only the number of likes.
https://graph.facebook.com/some_opengraph_id/likes?summary=true
This returns the number of likes, but that total seems to be much lower than what a query on FQL link_stat table would return. Also /likes returns a list of likes, but it doesn't seem to be a complete list.
So is it possible to do this via Graph API or only FQL / REST support this?
Thanks in advance!
I encountered the same behavior, but unfortunately afaik there are no other options currently. If you have a v2.0 app, you can continue to use FQL until August 7th, 2016.

How to get page fan count from last week

I want to get the number of new facebook fans for a given page from last week.
e.g.: monday to sunday of previous week.
I have searched for this but can't find any info.
I can get the total fan count easily from the social graph but not sure how to get new fan count from last week so that I can get a report like:
New fans last week: 152
Total fans: 2341
You have to be admin of that page, and you need the "read_insights" permission. Without user authorization you don´t have access to the Insights, and that´s the only way to get detailed statistics.
https://developers.facebook.com/docs/reference/fql/insights/
Using FQL, it is explained here:
How to get `page_fan_adds` for multiple days using FQL
A bit complicated, because you have to add the daily values. But on the same page, the much easier solution is presented:
bladauhu/insights/page_fan_adds/?since=1340175600&until=1342767600

How long limit parameter supported for Facebook check-in Graph API?

I'm trying the below Facebook API to getting my friends' check-in around a specified location.
https://graph.facebook.com/search?type=checkin&center=xx,xx&since=XX-XX-XX
Here I have a question, that is how long my friends' check-in I can got - seemed that since parameter can't support too long check-in, e.g. today is 2012-07-04, one of my friends made a check-in on 2012-06-02, but even I set the parameter of since looks like this: since=2012-06-01, there are no any data I can got, could you explain me why? thanks!
This query returns the last 20 checkins by default and can return a maximum of 500 checkins.
See the facebook checkins reference for more detail:
https://developers.facebook.com/docs/reference/fql/checkin/