1

I am trying to fetch the news feed of a Facebook account using Facebook's graph API.

Facebook's graph API is returning only the data of last day and not older then that.

I have gone through the Facebook API explorer and tried the same over there as well - but I'm still unable to get the data.

How can I get this data?

Owen Versteeg
  • 342
  • 2
  • 14
Aman Chhabra
  • 3,824
  • 1
  • 23
  • 39

1 Answers1

0

I use the a FQL query to get the closest result. The aggregation generated by Facebook for the user will not be returned which explains why the result don't return exactly the same as the view on Facebook NewsFeed.

Additionally, the "AND is_hidden = 0" will avoid to return hidden stories.

SELECT post_id, actor_id, target_id, message FROM stream WHERE filter_key in (SELECT filter_key FROM stream_filter WHERE uid=me() AND type='newsfeed') AND is_hidden = 0

You need the read_stream permission to do this. You can also stop asking for offline_access as it's being deprecated (https://developers.facebook.com/blog/post/2012/05/02/platform-updates--operation-developer-love/)

Alexcode
  • 1,598
  • 7
  • 15