Created
December 23, 2011 22:00
-
-
Save emadb/1515474 to your computer and use it in GitHub Desktop.
Get facebook group thread using fb_graph gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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