Module: FbGraph::Connections::Photos

Included in:
Album, Page, User
Defined in:
lib/fb_graph/connections/photos.rb

Instance Method Summary collapse

Instance Method Details

#photo!(options = {}) ⇒ Object


13
14
15
16
17
18
# File 'lib/fb_graph/connections/photos.rb', line 13

def photo!(options = {})
  photo = post options.merge(:connection => :photos)
  Photo.new photo[:id], options.merge(photo).merge(
    :access_token => options[:access_token] || self.access_token
  )
end

#photos(options = {}) ⇒ Object


4
5
6
7
8
9
10
11
# File 'lib/fb_graph/connections/photos.rb', line 4

def photos(options = {})
  photos = self.connection :photos, options
  photos.map! do |photo|
    Photo.new photo[:id], photo.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end