Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I retrieve the full newsfeed of a user via the Facebook API?
    text
    copied!<p>I would like to <strong>retrieve the full newsfeed including historical data</strong> of a given user. In principal, this is straight forward using either an authenticated call to the Graph API or to the FQL API.</p> <p>With the <strong>Graph API</strong>, I access the <code>me/home</code> endpoint. This results in 25 entries. I can iterate over the pages and retrieve around 8 pages back into history giving me around 200 entries. I write <em>around</em> 200 entries, because with each run through this I get a different number of total entries. Sometimes more, sometimes less.</p> <p>With the <strong>FQL API</strong>, I call <code>SELECT post_id, created_time, actor_id, message FROM stream WHERE filter_key = 'nf' AND is_hidden=0 AND created_time &gt; 1262304000 LIMIT 500</code> where the created time reflects 1 Jan 2010. This gives me around 150 entries.</p> <p>Both methods don't seem to allow to work your way backwards into history. In the FQL query, I also tried to play around with the <code>created_time</code> field and <code>LIMIT</code> to go backwards in small chunks but it didn't work.</p> <p>The documentation of the <code>stream</code> table <a href="http://developers.facebook.com/docs/reference/fql/stream/" rel="noreferrer">http://developers.facebook.com/docs/reference/fql/stream/</a> says somehow cryptically:</p> <blockquote> <p>The profile view, unlike the homepage view, returns older data from our databases.</p> </blockquote> <p>Homepage view - as far as I understand - is another word for Newsfeed, so that might mean that what I want is not even possible at all?</p> <p>To make things worse (but that's not the main topic of this question) <strong>the returned datasets from the two methods differ</strong>. Both contain entries that the other does not show but they also have many entries in common. Even worse, the same is true in comparison to the real newsfeed on the Facebook website.</p> <p>Does anyone have any experience or deeper insights on this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload