Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A collection of samples for validating and decrypting signed and encrypted requests from Facebook.
PHP Java JavaScript Python Ruby Shell
branch: master

This branch is 4 commits ahead of ptarjan:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

signed & encrypted requests

Provides samples for decoding signed and encrypted requests in a few different languages. To run the tests:


Note, you'll likely need to ensure some extensions are available in your environment.


Requires PyCrypto. To install, run:

 easy_install pycrypto


You will need a build of Ruby with OpenSSL support. Additionally, you'll need JSON. To install, run

 gem install json


Java requires these libraries:

If you see a exception along the lines of Illegal key size, you may need to get the right policy files to allow the use of AES-256 encryption. The policy files are available here.


You'll need these extensions:

If these aren't installed, then your script will fail with a message like:

 Fatal error: Call to undefined function mcrypt_create_iv()

If they aren't activated but are present on your system, you can try to activate them by adding these lines to your php.ini file:

If that doesn't work (gives as "Unable to load dynamic library" error), then you'll need to recompile PHP with the extensions included or install the extension using your system package manager.

Something went wrong with that request. Please try again.