Is there a limit on how many wall posts(from the past) can I get of a Facebook page using the Graph API? - facebook

I would think there would be a cut-off on the number of posts, or a cut-off in time period after which I won't be able to get the posts. From a few test runs, I am unable to form any idea as for some pages it returns all the posts till the beginning whereas for some it stops midway. Also neither is the number of posts hinting towards a constant limit, nor is the first post time hinting at any time cut-off.
The documentation(http://developers.facebook.com/d...) doesn't talk about any limit, so I am out of ideas. Can anyone throw some light on this and provide some credible information? Thanks already for your time.

The documentation https://developers.facebook.com/docs/reference/api/user/ was updated to show you get up to 25 posts.

Related

Difference in Engaged Users (Facebook page) and Engaged Users (Insights API)

We have a tool connecting with the Facebook Insights API to grab various metrics (Likes, Comments, etc).
One such metric is the Lifetime Engaged Users.
However, we've looked at many FB pages (not going through the API) and the insights numbers seem to be different.
I have used the Graph Explorer to check if there is an error in our request, and this is not the case. For example, in one case, the call returns "13480".
Here is the screenshot from the Insights page:
FB Insights Page
I may not be checking at the correct numbers, but can someone help me out?
I would like to figure out how I can find this particular metric, other than using our tool or using the Graph Explorer.
Thank you!
Try this: go recheck your call to API, remove that S from "metricS=metricName".
I met this problem today, and find that there are two ways to get object insight data:
object-id/insights/metricNameA,metricNameB
object-id/insights/?metric=metricNameA,metricNameB
I happened to use the 2nd way, and wrongly typed metricS instead of metric, which led to return an array of data for all metrics, and my code data[0].values[0].value therefore got the first metric in that array which is "post_story_adds_unique", if you have same mistake as mine, that 13480 could be this 1st metric return by default from FB.

Getting Facebook page posts of the last hour/day etc

Is it possible to specify a time span for the posts returned by GET /v2.x/{page-id}/feed?
For example, I want all the posts of the last hour and only those...
EDIT: Just found the since and until fields for the feed. However, this only seems to apply to posts, not to comments on those posts...
Any way to apply the time span to both posts and comments, regardless?
Ideally, I would get a chronological list of messages (whether posts or comments) for the last X time units.
Graph API returns comments in same order as selected on actual post|picture|etc..
I already searched alot about this. Then i went for a stupid but simple solution. I can show you if you are willing to made 2 requests to graph api to get comments

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 does not give any data earlier than 2011?

I'm the author of Fazzle app on iPhone. What my app does is basically download user status updates and sort them in various orders (e.g. most liked, most commented).
I have been wondering if Facebook allow developers to get user's status updates since the day they joined Facebook, because when I launched the app I can only get user statuses from 2009. Today I just discovered that Facebook limits Graph API calls down to just since 2011.
I tried looking at documentations, asked around here, and contacted Facebook through their forum. However so far there is no word on this limitation in Graph API. Did I miss something? Is there any other way for me to get data for status updates earlier than 2011?
You can test it yourself here. Use this GET request:
https://graph.facebook.com/(your_user_id)/statuses?limit=99999
Scroll down and you'll find out that not everything's downloaded.
Is this because of conflict of interest with Facebook Timeline? If so, that sucks.
Logged as a bug here. Still hoping someone can point out my mistakes if there's any.
Absolutely you can get older posts from Graph API; there is no limit (at least not that I am aware of). Use the since and until parameters to page back through results, instead of offset:
https://graph.facebook.com/me/feed?access_token=[token]&until=1165474447
Documentation for Paging doesn't go very in-depth on since and until:
When querying connections, there are several useful parameters that enable you to filter and page through connection data:
limit, offset: https://graph.facebook.com/me/likes?limit=3`
until, since (a unix timestamp or any date accepted by strtotime):
https://graph.facebook.com/search?until=yesterday&q=orange
But basically, until is like saying "Give me posts up until this date", and since is similar, "Give me posts since this date". So you can scroll all the way back through a user's feed using a loop something like this:
// pseudocode
timestamp = now
do {
posts = graph.get(/me/feed?until=timestamp)
if posts.length == 0: break;
// process posts
timestamp = posts[0].created_time // first should be the oldest, in theory
} while (1)
Replace until with since and oldest created_time with the newest to go forwards in time, e.g. to grab any newer posts since the last time the user ran the app.
Facebook has since confirmed this as a bug. If you have followed Facebook's bug tracker ever, unfortunately that means there is very little if any chance they will actually fix this.
You will need to paginate. Limit is limited. Please read http://developers.facebook.com/blog/post/478/

facebook opengraph api return limitations?

I'm just experimenting with opengraph a bit and I was trying to retrieve all the posts a user has ever made. And I noticed that when do
user_id/statuses?limit=200
it only returns 99 statusses, is this because i'm doing it trough the graph api explorer on developers.facebook.com? is there a way to get all the users posts with the extra information, like in graph(comments/likes...)?
the next/previous links didn't help they both returned an empty json string
there are some limitations enforced here - if a user has (hypothetically) seven million posts, Facebook's servers will be bogged down with your request. All requests have a limitation on them - even if not specifically set. Pay attention to the parameters in the next and prev pagination links. They contain values such as :
limit - how many items will be returned in each request
offset - an offset to start from, an offset of 15 will start returning posts from the 15th and onward.
since - epoch timestamp defining the begining of a timeframe
untill- epoch timestamp defining the end of a timeframe
Hope this info helps...
There is also a limit in the amount of information that Facebook allows to be gotten via the Graph API. The data stores for the public Graph API are not the same as the data stores Facebook uses for the normal GUI. If your app desperately needs full information, it is possible that becoming a Facebook partner might get you better results.