Search code examples
facebookfacebook-graph-apifacebook-fqlfeed

Get all latest entries in users news feed


Does anyone know of a way to retrieve the users entire news feed? Querying /me/home does filter some stories from. Also, it seems to retrieve the top stories. Is there any way to retrieve the latest stories?

It doesn't matter whether it's through the Graph API or FQL.


Solution

  • me/home is pulling posts in order of created date on my end

    https://developers.facebook.com/tools/explorer/135669679827333/?method=GET&path=me%3Ffields%3Dhome.limit(20).fields(created_time%2Cupdated_time%2Cid)

    try this as your query, you can mod fields to include any you need.

    me?fields=home.limit(20).fields(created_time,updated_time,id)
    

    if it is still out of order because of your cookie settings from the actual home feed, you can force it to reorder by passing the array in sort(); "php".

    for sort() refer to: http://php.net/manual/en/function.sort.php