Skip to content

Instantly share code, notes, and snippets.

@pavana21
Created February 8, 2013 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavana21/4740860 to your computer and use it in GitHub Desktop.
Save pavana21/4740860 to your computer and use it in GitHub Desktop.
Account.customers.each do |account|
social_profile = account.social_profile
puts "Am in Comments"
if social_profile && social_profile.facebook.present?
facebook = social_profile.facebook
page_id = facebook.page_id
if facebook.social_feeds && facebook.social_feeds.length > 0
puts "Am in News Feed - Comments/Likes"
facebook.social_feeds.each do |feed |
begin
news_feed1 = FacebookApi.news_feed(page_id, account, feed.feed_id)
create_comments_and_likes(news_feed1, feed, account)
rescue => e
e
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment