I
I
Ilya Myasin2017-02-06 00:23:07
Facebook
Ilya Myasin, 2017-02-06 00:23:07

Is it true that the latest Facebook API does not allow you to get the feed (newsfeed)?

Hey! I seem to have the simplest task - to get my feed via the API (what I see, that is, the posts of friends and groups to which I am subscribed), and then process it somehow.
It's good to learn the API. It seems that the most suitable resource is /{user-id}/home :

This endpoint returns posts a person sees in their News Feed. The posts returned by this API may not be identical to the posts a person would see on facebook.com or in Facebook's mobile apps.

Only here it is marked as deprecated:
As of October 6th, 2015, this endpoint is no longer available. Please consider using the /user-id/feed edge instead.

Although in Graph Explorer you can switch to version 2.3 (from the current 2.8) and make sure that this is exactly what you need. The /user-id/feed/
recommended as an alternative is somehow poorly suited, because it shows the user's chronicle, that is, the posts that he posted and in which he was tagged:
The feed of posts (including status updates) and links published by this person, or by others on this person's profile.

So far, the best thing that came to mind is to use a query like /me/friends/?fields=last_name,posts.since(2017-02-01) - that is, all my friends, and for each show posts written after such and such a date . A similar feint can be done for groups ( /me/likes/?... ). But there are a lot of obvious flaws here. Two requests. You have to remember the date. Friends and groups where there are no posts, these requests are also shown. Pagination occurs not by posts, but by friends. Pages that I subscribed to, but did not like, must be received somehow else. Short obliquely.
UPD: request to /me/friends/?fields=last_name,posts.since(2017-02-01) fails because :
In v2.0 of the Graph API, calling /me/friends returns the person's friends who also use the app.

Can you tell me if there is an obvious way? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philipp, 2017-02-06
@zoonman

Unfortunately, there is no obvious way here. Facebook has purposely banned access to this API.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question