Class: FbGraph::Auth::Cookie

Inherits:
Object
  • Object
show all
Defined in:
lib/fb_graph/auth/cookie.rb

Overview

NOTE: If you want access token, use FbGraph::Auth.new(APP_ID, APP_SECRET, :cookie => ..) instead

Class Method Summary collapse

Class Method Details

.parse(client, cookie) ⇒ Object

Raises:



6
7
8
9
10
11
12
13
14
15
# File 'lib/fb_graph/auth/cookie.rb', line 6

def self.parse(client, cookie)
  signed_request = case cookie
  when String
    cookie
  else
    cookie["fbsr_#{client.identifier}"]
  end
  raise VerificationFailed.new('Facebook cookie not found') if signed_request.blank?
  SignedRequest.verify(client, signed_request)
end