FbUtils
fb_utils is Ruby gem that lets you get and save facebook comments.
You can save comment in txt or csv file.
Installation
Type
gem install fb_utils
or
add this to your Gemfile and run the bundle command
gem 'fb_utils'
#Usage
If you need to just get comments, call get method with URL
comments = FbUtils::Comment.get('http://www.example.com')
comment = comments.first
puts comment.id
puts comment.message
puts comment.created_time
puts comment.from_name
puts comment.from_id
In order to save comments in file system, call save method with URL and file name.
You can choose txt or csv file type (or write your own writer).
Default is txt.
FbUtils::Comment.save('http://www.example.com', 'example_com')
FbUtils::Comment.save('http://www.example.com', 'example_com', :format => :csv)
FbUtils::Comment.save('http://www.example.com', 'example_com',
:format => :csv,
:fields_terminated_by => ";",
:fields_enclosed_by => "'",
:lines_terminated_by => "\n"
)
References
http://developers.facebook.com/docs/reference/plugins/comments/