Method: FGraph.me

Defined in:
lib/fgraph.rb

.me(*args) ⇒ Object

call-seq:

FGraph.me(category)

Returns current user object details.

category - friends|home|feed|likes|movies|books|notes|photos|videos|events|groups

# Current user: https://graph.facebook.com/me?access_token=...
FGraph.me(:access_token => '...')

# Current user's friends: https://graph.facebook.com/me/friends?access_token=...
FGraph.me('friends', :access_token => '...')
FGraph.me_friends(:access_token => '...')


144
145
146
147
148
149
150
151
# File 'lib/fgraph.rb', line 144

def me(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  category = args.shift

  path = "me"
  path += "/#{category}" unless category.blank?
  self.object(path, options)
end