Module: FbGraph::Connections::Offers
- Included in:
- Page
- Defined in:
- lib/fb_graph/connections/offers.rb
Instance Method Summary collapse
Instance Method Details
#offer!(options = {}) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/fb_graph/connections/offers.rb', line 13 def offer!( = {}) # A page access token is required to change an associated offer offer = post .merge(:connection => :offers).merge(:access_token => self.page_access_token) Offer.new offer[:id], .merge(offer).merge( :access_token => [:access_token] || self.access_token ) end |
#offers(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/fb_graph/connections/offers.rb', line 4 def offers( = {}) offers = self.connection :offers, offers.map! do |offer| Offer.new offer[:id], offer.merge( :access_token => [:access_token] || self.access_token ) end end |