Skip to content

Instantly share code, notes, and snippets.

@jamesdaniels
Created February 3, 2009 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesdaniels/57229 to your computer and use it in GitHub Desktop.
Save jamesdaniels/57229 to your computer and use it in GitHub Desktop.
Verify communications from facebook
def verifed_facebook_autheticity(signature, params)
Digest::MD5.hexdigest((params.keys.sort.collect {|key| "#{key}=#{params[key]}"} << APP_CONFIG[:facebook_api_secret]).to_s).strip == signature
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment