Skip to content

rack-facebook is a Rack middleware that checks the signature of Facebook params, and converts them to Ruby objects when appropiate. Also, it converts the request method from the Facebook POST to the original HTTP method used by the client.

carlosparamio/rack-facebook

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Gem Version

This Rack middleware checks the signature of Facebook params, and converts them to Ruby objects when appropiate. Also, it converts the request method from the Facebook POST to the original HTTP method used by the client.

If the signature is wrong, it returns a "400 Invalid Facebook Signature".

Optionally, it can take a block that receives the Rack environment and returns a value that evaluates to true when we want the middleware to be executed for the specific request.

Usage

In your config.ru:

require 'rack/facebook'
use Rack::Facebook, :app_name => "My Application", :application_secret => "SECRET", :api_key => "APIKEY"

Using a block condition:

use Rack::Facebook, "my_facebook_secret_key" do |env|
  env['REQUEST_URI'] =~ /^\/facebook_only/
end

Credits

Carlos Paramio

http://h1labs.com/

Bitdeli Badge

About

rack-facebook is a Rack middleware that checks the signature of Facebook params, and converts them to Ruby objects when appropiate. Also, it converts the request method from the Facebook POST to the original HTTP method used by the client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages