Skip to content

Instantly share code, notes, and snippets.

@emadb
Created December 23, 2011 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emadb/1515474 to your computer and use it in GitHub Desktop.
Save emadb/1515474 to your computer and use it in GitHub Desktop.
Get facebook group thread using fb_graph gem
my_app = FbGraph::Application.new(ENV['app_id']);
acc_tok = my_app.get_access_token(ENV['token']);
group = FbGraph::Group.new('270489496319056', :access_token => acc_tok).fetch;
puts @group.to_yaml
#@group.feed.each{|e| puts e.to_yaml}
post = group.feed[0]
puts post.name
puts post.message
puts post.from.name
puts 'comments'
puts post.comments.each_with_index {|c, i| puts i.to_s + ' - ' + c.message}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment