Module: FbGraph::Connections::Tags

Included in:
Message, Photo, Thread
Defined in:
lib/fb_graph/connections/tags.rb

Defined Under Namespace

Modules: Taggable

Instance Method Summary collapse

Instance Method Details

#tags(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/fb_graph/connections/tags.rb', line 4

def tags(options = {})
  tags = if @_tags_ && options.blank?
    return @_tags_ if @_tags_.first.is_a?(Tag)
    self.connection(:tags, options.merge(:cached_collection => @_tags_))
  else
    self.connection(:tags, options)
  end
  tags.map! do |tag|
    tag[:access_token] ||= options[:access_token] || self.access_token
    Tag.new(tag)
  end
end