Method: FbGraph::Auth#initialize
- Defined in:
- lib/fb_graph/auth.rb
#initialize(client_id, client_secret, options = {}) ⇒ Auth
Returns a new instance of Auth.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fb_graph/auth.rb', line 7 def initialize(client_id, client_secret, = {}) @client = Rack::OAuth2::Client.new( :identifier => client_id, :secret => client_secret, :host => URI.parse(ROOT_URL).host, :authorization_endpoint => '/oauth/authorize', :token_endpoint => '/oauth/access_token' ) if [:cookie] [:cookie] elsif [:signed_request] from_signed_request [:signed_request] end end |