lib/fb_graph/post.rb in fb_graph-2.1.10 vs lib/fb_graph/post.rb in fb_graph-2.1.11
- old
+ new
@@ -1,12 +1,13 @@
module FbGraph
class Post < Node
include Connections::Comments
+ include Connections::Insights
include Connections::Likes
extend Searchable
- attr_accessor :from, :to, :message, :picture, :link, :name, :caption, :description, :source, :properties, :icon, :actions, :privacy, :type, :graph_object_id, :application, :targeting, :created_time, :updated_time
+ attr_accessor :from, :to, :with_tags, :message, :picture, :link, :name, :caption, :description, :source, :properties, :icon, :actions, :privacy, :type, :graph_object_id, :application, :targeting, :created_time, :updated_time
def initialize(identifier, attributes = {})
super
if (from = attributes[:from])
@from = if from[:category]
@@ -29,9 +30,15 @@
Application.new(to[:id], to)
else
User.new(to[:id], to)
end
end
+ end
+ end
+ @with_tags = []
+ if attributes[:with_tags]
+ Collection.new(attributes[:with_tags]).each do |tagged|
+ @with_tags << User.new(tagged[:id], tagged)
end
end
@message = attributes[:message]
@picture = attributes[:picture]
@link = attributes[:link]
\ No newline at end of file