Module: FbGraph::Connections::Tabs
- Included in:
- Page
- Defined in:
- lib/fb_graph/connections/tabs.rb
Instance Method Summary collapse
- #tab!(options = {}) ⇒ Object
- #tab?(application, options = {}) ⇒ Boolean
- #tab_for_app(application, options = {}) ⇒ Object
- #tabs(options = {}) ⇒ Object
Instance Method Details
#tab!(options = {}) ⇒ Object
13 14 15 |
# File 'lib/fb_graph/connections/tabs.rb', line 13 def tab!( = {}) post .merge(:connection => :tabs) end |
#tab?(application, options = {}) ⇒ Boolean
17 18 19 20 |
# File 'lib/fb_graph/connections/tabs.rb', line 17 def tab?(application, = {}) tab = self.connection :tabs, .merge(:connection_scope => application.identifier) tab.present? end |
#tab_for_app(application, options = {}) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/fb_graph/connections/tabs.rb', line 22 def tab_for_app(application, = {}) response = get .merge(:connection => :tabs, :connection_scope => application.identifier) tab = response[:data].first Tab.new tab[:id], tab.merge( :access_token => [:access_token] || self.access_token ) end |