user2669043
user2669043

Reputation: 117

How to retrieve all friends' posts from facebook api

I'm new to facebook api, but are there anyway to retrieve all posts from my friends (current and historical)? I tried

  me/home?limit=10000

but this seems to combine posts from suggested/sponsored/liked_sites which I don't want. Plus it doesn't seem to go and get all the posts

What I'm trying to do is to find when and how many times users' friends post and the likes and comments.

Upvotes: 0

Views: 775

Answers (1)

Tobi
Tobi

Reputation: 31479

With Graph API v2.0 this is no longer possible, because all the friends_* permissions have been removed. See https://developers.facebook.com/docs/apps/changelog#v2_0_permissions

With v1.0 the request would have been

GET /me?fields=friends.fields(posts)

which currently fails (at least for me) when querying all my friends data without limits. FB is applying API request limits apparently.

Using

GET /me?fields=friends.fields(posts.limit(10)).limit(50)

works, but it will only give you the last 10 posts of 50 of your friends.

https://developers.facebook.com/tools/explorer?method=GET&path=me%3Ffields%3Dfriends.fields(posts.limit(10)).limit(50)&version=v1.0

Upvotes: 1

Related Questions