Getting old records from Facebook using the API - facebook

I want to fetch some historical data using the api. But when I access older and older pages, I suddenly hit one that's returning me empty data.
For example, call to this url: https://graph.facebook.com/kenderken/posts?limit=100&until=2010-06-01T09:10:53%2B0000 returns me empty data even that there are posts on my wall that are older then 2010-06-01... (here's the last one that API returns to me: http://www.facebook.com/kenderken/posts/134367776579392 and this one http://www.facebook.com/kenderken/posts/271650467287 is from January 2010, no way to get it via API)...
Any clues on that?

That is a fairly common bug with Facebook. If you search http://bugs.developers.facebook.net/ you will find many similar reports.

Related

How to find posts of a facebook page within a certain period of time?

I want to import posts of a page between 07-12-2017 and 10-12-2017.
I have converted the dates to unix timestamps.
https://graph.facebook.com/v2.11/ekantipur?fields=posts.until(1512926148).limit(125)&access_token=MyAccessToken
works and so does
https://graph.facebook.com/v2.11/ekantipur?fields=posts.since(1512666948).limit(125)&access_token=MyAccessToken
But since and until together does not work. It only shows a single id.
Is there an another way to accomplish this task? If yes please reply. Thankyou in advance.
Update here is my updated Url with since and until. Its still not working.
123456/posts?since=07-12-2017&until=10-12-2017
Can you update the original post with your combined Since and Until?
I'm assuming that the SINCE is set to 7/17 and the UNTIL is 10/17, correct? It looks that way from the converted numbers, but I try not to assume it isn't something small like that :). No offense intended.
Looking at the graph API, I am using the page id of one I am the admin of and using since and until and it's coming back with posts between 07-12-2017 and 10-12-2017. I'm wondering if it has something to do with the limit in your urls. What if the limit statements are narrowing things down too much?
I'm just putting this into the graph API and getting the results I'm expecting: (no, my page id isn't 123456)
Granted, I'm not calling it in a url, Graph API is pretty forgiving.

Can you extract Facebook data by date range using Facepager?

I've been using Facepager for research purposes for almost a year now and I can't figure out how to extract data - public posts, comments and likes from a page, for instance - by date range. While other programs such as Netvizz gives me this option, Facepager seems to fail to do so.
Thank you.
You can use the since and until parameters for this, e.g. set since (left side in parameter settings) to 2017-09-13 (right side) when fetching posts of a page. See the section Time Based Navigation in the Facebook Graph API.
Keep in mind that accessing very old data with the API is limited by Faceebok. Most social media platforms are aligned to the presence :)
BTW: we just opened a Group on Facebook for getting help.

Facebook Page Comments Using Graph API & Stream Filter

I have my site working using the Facebook Comments Plugin as you can see here http://www.amanzitravel.com/namibia-wildlife-sanctuary
I am trying to use the Graph API to retrieve the comments so they are on the page in a form that is beneficial for SEO (as outlined here https://developers.facebook.com/docs/plugins/comments/).
Ideally I want to see not only all comments, but replies to comments. According to the API (https://developers.facebook.com/docs/graph-api/reference/v2.0/object/comments) using filter=stream should do the trick.
However when I do that I only get the two most recent comments e.g. https://graph.facebook.com/comments/?ids=http://www.amanzitravel.com/namibia-wildlife-sanctuary&filter=stream as opposed to the default https://graph.facebook.com/comments/?ids=http://www.amanzitravel.com/namibia-wildlife-sanctuary where I get all the top level comments but none of the replies.
EDIT: Further to this, it appears to update itself some time later, but when another reply is added it goes back to displaying a subset of all the comments for a period of time. Its unfortunate because it means I can't rely on this to be accurate.
Is there anyway I can make this work properly?

Get old Facebook posts from public FB page

For a university research project I need to view some old posts on public Facebook pages from a specific date range (January 22-31 2014.) I was planning just to copy and paste each post but I have run into a problem with some of the pages that generate a very high volume of posts. Facebook will not display past a certain date. Even with scrolling down, at a certain point the posts stop displaying (this is true by month, so it jumps from January 25 directly to December 31 for example).
Here are the pages I am interested in:
https://www.facebook.com/Syrian.Revolution
https://www.facebook.com/Syrian.Truth
I have read about Facebook's Graph API but have had some trouble using it (I don't have a developer's background.) Also the posts are mostly in Arabic so that may be a problem.
I just need the pages' posts, not the comments sections.
Thanks anyone so much for your help, it is very appreciated.
Really depends on what language/environment you're using. As a simplest case, you can just use Graph API Explorer (https://developers.facebook.com/tools/explorer) and make a call:
{{page_id}}/posts
There are a lot of ways you can improve this call for your benefit. For example, you can use a limit parameter to increase the default number of results it retruns.
{{page_id}}/posts?limit=200
By default, this returns a lot of fields, you can limit the fields.
{{page_id}}/posts?limit=200&fields=id,message,created_time
You can visit https://developers.facebook.com/docs/graph-api/reference/page/feed/ to find out which fields are supported.
In order to get results during a certain time-range, you can use the created_time field to determine if a post belongs to a certain time interval.

Facebook Graph API Event Paging not working?

I am trying to access past event via Facebook's Graph API.
I am getting current events just right (the one I attended last month and the one in the future) with
https://graph.facebook.com/me/events?access_token=[ACCESS_TOKEN]
However, the paging components "previous" and "next" don't really work, "previous" actually points to a future event that's already been listed in "me/events". While "next" just returns an empty "data" struct.
I also tried "since" with different previous timestamps (such as "me/events?since=1304238280") and it didn't work, it will always return the events that are the same as the ones returned by "me/events". But I definitely have many more past events when I visit
https://www.facebook.com/events/past/
Am I not using the graph API correctly or what? I also noticed there are quite a few questions regarding Graph API's paging problem but there doesn't seem to be a definitive answer yet.
Any info/suggestion/reference would be greatly appreciated!
From what I've seen, it appears that about two weeks after an event ends, Facebook moves the event data out of the events table and into another one that isn't exposed via the API. The internal Facebook servers have access to this table, so you can see past events from within the Facebook webapp.
I'm assuming this is a privacy thing.
try to add the "before" query string with the ID of the first event ex:https://graph.facebook.com/me/events?&before=388551911259170.
you can refer to the following link: https://developers.facebook.com/docs/reference/api/pagination/