Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for verifying rest_graph_fbs_ within a facebook app flow #5

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -22,4 +22,7 @@ group :test do
gem 'rr'
gem 'webmock'
gem 'bacon'
if RUBY_VERSION >= '1.9.2'
gem 'psych'
end
end
3 changes: 2 additions & 1 deletion lib/rest-graph/core.rb
Expand Up @@ -350,7 +350,8 @@ def parse_cookies! cookies
def parse_fbs! fbs
self.data = check_sig_and_return_data(
# take out facebook sometimes there but sometimes not quotes in cookies
Rack::Utils.parse_query(fbs.to_s.gsub('"', '')))
Rack::Utils.parse_query(fbs.to_s.gsub('"', ''))) ||
check_sig_and_return_data(Rack::Utils.parse_query(fbs.to_s))
end

def parse_json! json
Expand Down
5 changes: 3 additions & 2 deletions rest-graph.gemspec
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.authors = [
%q{Cardinal Blue},
%q{Lin Jen-Shin (godfat)}]
s.date = %q{2011-05-26}
s.date = %q{2011-05-27}
s.description = %q{A lightweight Facebook Graph API client}
s.email = [%q{dev (XD) cardinalblue.com}]
s.extra_rdoc_files = [
Expand All @@ -19,6 +19,7 @@ Gem::Specification.new do |s|
s.files = [
%q{.gitignore},
%q{.gitmodules},
%q{.rvmrc},
%q{CHANGES},
%q{CONTRIBUTORS},
%q{Gemfile},
Expand Down Expand Up @@ -108,7 +109,7 @@ Gem::Specification.new do |s|
%q{--main},
%q{README}]
s.require_paths = [%q{lib}]
s.rubygems_version = %q{1.8.4}
s.rubygems_version = %q{1.8.3}
s.summary = %q{A lightweight Facebook Graph API client}
s.test_files = [
%q{test/test_api.rb},
Expand Down