I want to a build a website that show the user all videos that his friends published on facebook, I know how to pull the news feed for recent posts, but I don't know how to pull all the posts for specific day (all the posts from the start of the day).
I use this FQL call to pull the recent videos:
SELECT post_id, source_id, actor_id, target_id, message, attachment, permalink, type FROM stream
WHERE source_id IN (SELECT target_id FROM connection WHERE source_id=me() AND is_following=1)
AND is_hidden = 0
AND type = 80
AND strpos(attachment.href, "youtu") >= 0
but I don't know how to pull all the videos from the start of the day to it's ending...
Edit:
Now I have in my code as your answer:
@feed = Koala::Facebook::API.new(current_user.token)
to = Time.now.to_i
yest = 1.day.ago.to_i
@feed.fql_query("SELECT post_id, actor_id, target_id, message, likes FROM stream WHERE source_id = me() AND created_time > #{yest} AND created_time < #{to} AND type = 80
AND strpos(attachment.href, "youtu") >= 0")
and the feed variable returns me # and not a json, how can I get a json from this variable?