Skip to content

Instantly share code, notes, and snippets.

@emadb emadb/fb_test.rb
Created Dec 23, 2011

Embed
What would you like to do?
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
You can’t perform that action at this time.