Getting public page's posts (timeline) using FQL

154 views Asked by At

I try to get posts for a public facebook page using FQL:

SELECT post_id, created_time, type,like_info.like_count,comment_info.comment_count,message     FROM stream WHERE source_id ='118074121050' and like_info.like_count > 800

118074121050 is the ID for public page https://www.facebook.com/cliomakeup The token i use allows to read stream.

The result of the query just one post while there are many posts with over 800 numbers of likes (according to the page's timeline).

The question is why the fql result does not show me all the posts as they're public?

1

There are 1 answers

0
Stéphane Bruckert On

The stream table also gives posts by users, which doesn't look like being what you need. In order to filter posts from the page owner only, you need to specify the actor_id as being the same as the source_id:

SELECT post_id, created_time, type, like_info.like_count, comment_info.comment_count, message     
  FROM stream 
 WHERE source_id = '118074121050' AND actor_id = '118074121050'
   AND like_info.like_count > 800