New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fb_utils

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fb_utils

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

Get comments

If you need to just get comments, call get method with URL

# return Array of comments
comments = FbUtils::Comment.get('http://www.example.com')
comment = comments.first
puts comment.id				#=> "388101711259_17396935"
puts comment.message		#=> "Hello world"
puts comment.created_time	#=> "2011-07-26T01:23:34+0000"
puts comment.from_name		#=> "Lukasz Kr"
puts comment.from_id		#=> "123456789101112"

Save comments

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.

# Save comments in example_com.txt file
FbUtils::Comment.save('http://www.example.com', 'example_com')

# Save comments in example_com.csv file
FbUtils::Comment.save('http://www.example.com', 'example_com', :format => :csv)

# For csv file you can pass additional parameters
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/

FAQs

Package last updated on 23 Nov 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc