Method: GraphAPI#initialize
- Defined in:
- lib/graph_api.rb
#initialize(access_token, code = nil, callback_url = nil) ⇒ GraphAPI
Public: Creates a new Graph API instance.
Returns a object representing the current Facebook user with properties specified in the self.class.user_fields hash array.
131 132 133 134 135 136 137 |
# File 'lib/graph_api.rb', line 131 def initialize(access_token, code=nil, callback_url=nil) @access_token = if not code.nil? self.class.fetch_token(code, callback_url) else access_token end end |