Advertisement
Guest User

Untitled

a guest
Apr 14th, 2012
925
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. How to get all posts from facebook user news feed for specific day
  2. @feed = Koala::Facebook::API.new(current_user.token)
  3. to = Time.now.to_i
  4. yest = 1.day.ago.to_i
  5. @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
  6. AND strpos(attachment.href, "youtu") >= 0")
  7.  
  8. require 'koala'
  9. @graph = Koala::Facebook::API.new("YOUR_ACCESS_TOKEN")
  10. @graph.fql_query("SELECT post_id, actor_id, target_id, message FROM stream WHERE source_id = me() AND created_time > START_TIME AND created_time < END_TIME LIMIT 10")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement