I want to find all the feeds with comments an also the profile image of the the user who commented on the posts. I found that it can be done through batch request. Now i am doing like this which fires lots of API request.
@facebook = FacebookToken.find_by_id(token.id)
@graph = Koala::Facebook::API.new(@facebook.access_token)
@results = @graph.get_connections("me", self.content)
@results.each do |post|
post['comments']['data'].each do |comment|
commnentor_image = @graph.get_picture(comment["from"]["id"])
end
end
How can i get these into a single batch request so that it will give me all the posts with comments with the commentor image.
Thank's