Tieme
Tieme

Reputation: 65519

Get Friends' Facebook posts

Is there a way to use facebook's FQL to fetch all posts (or video posts) of a user's friend?

For example something like:

SELECT post_id, message FROM stream WHERE source_id=(fb_friends_array) 

And how do i use this with the graph api. Normally i use the following syntax to get data:

$data = json_decode(file_get_contents(....));

Upvotes: 4

Views: 1418

Answers (1)

Lix
Lix

Reputation: 48006

Yes there is!

https://graph.facebook.com/{friends_uid}/posts

This call will return ALL posts ( and data within the posts - comments, etc...) that you have permissions to see( depends on your friends privacy settings )...

In order to retrieve pictures or videos, all you have to do is change "posts" with videos or pictures... Of course your application will have to have permissions to see you friends pictures and videos..

Upvotes: 4

Related Questions