Created
February 8, 2013 18:15
-
-
Save pavana21/4740860 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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