proc { |post, viewer|
resp = {
:likes_type => "http://schema.org/AggregateRating/Likes",
:id => post["post_id"],
:comments => [],
:likes => [],
:articleBody => post["message"],
:dateCreated => "#{post["created_time"]}",
:author => PersonUser.new(:facebook, { "id" => "#{post["actor_id"]}" }),
:likes_count => post["likes"]["count"],
:comments_count => post["comments"]["count"],
:viewer => PersonUser.new(:facebook, { "id" => "#{post["viewer_id"]}" }),
:provider => ["facebook"]
}
i = 0
post["likes"]["sample"].each do |like|
resp[:likes].push "like#{i}"
i = i + 1
end
post["comments"]["comment_list"].each do ||
resp[:comments].push UserComments.new :facebook,
end
resp
}