Module: FbGraph2::Edge::Photos

Included in:
Album, FbGraph2::Event, Milestone, Page, User
Defined in:
lib/fb_graph2/edge/photos.rb

Instance Method Summary collapse

Instance Method Details

#photo!(params = {}) ⇒ Object



12
13
14
15
# File 'lib/fb_graph2/edge/photos.rb', line 12

def photo!(params = {})
  photo = self.post params, edge: :photos
  Photo.new(photo[:id], params.merge(photo)).authenticate self.access_token
end

#photos(*args) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/fb_graph2/edge/photos.rb', line 4

def photos(*args)
  params = args.extract_options!
  photos = self.edge :photos, params, edge_scope: args.first
  photos.collect! do |photo|
    Photo.new(photo[:id], photo).authenticate self.access_token
  end
end