
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
RubyFacebook - interact with Facebook REST API (json) - rails3 enabled
Share datas with Facebook via JSON with RFb! No XML to deal with, no parsers needed, reduced verbosity, increased happiness. Ruby1.9 required.
gem install RFb
to bundle RFb, in your Gemfile:
gem 'RFb', :require => 'r_fb'
configurations in yml file soon will come...
config/initializers/facebook.rb :
require 'r_fb'
RFb.app_name = "your_app_name"
RFb.environment = Rails.env
RFb.api_key = {
development: "your_facebook_api_key_here",
test: "",
production: ""
}
RFb.secret_key = {
development: "your_facebook_secret_here",
test: "",
production: ""
}
RFb.debug = true # displays
and you're done!
See the facebook REST API ( http://wiki.developers.facebook.com/index.php/API ) so you can see what methods are available and how to call them.
Example:
To get some user information:
fields = %w(username name first_name has_added_app locale pic profile_url status timezone)
RFb.request({
method: "facebook.Users.getInfo",
uids: [1218562195].to_s,
fields: [fields].to_s
})
result:
[{"first_name":"Francesco","name":"Francesco Canessa","pic":"http:\/\/profile.ak.fbcdn.net\/v22940\/158\/98\/s1218562195_9493.jpg","status":{"message":"","time":0,"status_id":0},"timezone":1,"uid":1218562195,"has_added_app":true,"locale":"en_US","profile_url":"http:\/\/www.facebook.com\/makevoid","username":"makevoid"}]
a shorter version:
User.new(fb_id: 1218562195)
build better rails3 controllers-model api and document... I'll create an example project
RFb::User.new(fb_id: @current_user.fb_id).friends
result (an array of users properties):
[{"current_location"=>{"city"=>"Buffalo", "state"=>"New York", "country"=>"United States", "zip"=>"14623"}, "first_name"=>"Ali", "name"=>"Ali Babloo", "pic"=>"http://profile.ak.fbcdn.net/v230/1615/8/s1027654249_4327.jpg", "status"=>{"message"=>"", "time"=>0, "status_id"=>0}, "timezone"=>-8, "has_added_app"=>true, "locale"=>"en_US", "profile_url"=>"http://www.facebook.com/dark14horse", "username"=>"dark14horse"}, {..........}, {...}]
more docs will come when session handling API will be solid enough!
Look at the source code and see that is pretty simple stuff, so fork it, change it, get inspired and roll your own... simply do whatever you want!
FAQs
Unknown package
We found that RFb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.