Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get User feed with FQL?

Is it possible to use FQL to get user's feed? To get the same like graph.facebook.com/user/feed

like image 406
Juuso Kosonen Avatar asked Dec 11 '25 14:12

Juuso Kosonen


1 Answers

The request mentioned in cpilko's answer will get you the current user's Newsfeed (i.e. the equivalent of Graph API's /me/home). Therefore I don't think that answer should have been accepted.

As for the current user's Timeline (i.e. the equivalent of Graph API's /me/feed): There is no easy way to get this with only one request because the Timeline contains different pieces of information:

  • It contains status updates by the current user.
  • It contains posts by other users that are targeted to the current user.
  • It does NOT contain posts by the current user targeted to other users, events, etc.
  • It does NOT contain stories by the current user that have neither a message text nor an attached photo, link, or place.*

*: I'm not 100% sure on the last one because information on this is sketchy at best. There are different post types (a complete list of which I haven't seen yet), and there seems to be some kind of logic which types are shown on the Timeline and which are not. As I said, documentation is sketchy and it seems like Facebook doesn't want you to get exactly the same data as they do.

Now to answer your question: If you're planning to offer a user's Timeline as part of your app experience, you should probably aim at a best-guess approach.

Here is an example that I find comes pretty close (except that it doesn't get you posts of friends on your Timeline, but as I said: best-guess):

SELECT post_id, actor_id, target_id, description, message, attachment, type, permalink
FROM stream 
WHERE source_id = me()
AND is_hidden != "true"
AND (type = 46 OR type = 60 OR type = 65 OR type = 80 OR type = 128 OR type = 247 OR type = 285 OR type = 373)
LIMIT 100

By the way, this is the most complete list of post types I have found so far: Where to get a list of ALL facebook stream posts types?

Hope this helps, even though the answer admittedly isn't that encouraging. :)

like image 61
Michael Fischbach Avatar answered Dec 14 '25 08:12

Michael Fischbach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!