Purchase a campaign and make it live, then:
rake webhook:facebook:comment:add[5,4]
where 5 is the FacebookAdCreative with id 5 and 4 is the number of comments.
rake webhook:facebook:like:add[5,4]
You should see output Status: 200
Facebook::PageFeedUpdateNotifier.new.perform(<facebook_creative_id>,:notify_comments)
Facebook::PageFeedUpdateNotifier.new.perform(<facebook_creative_id>,:notify_likes)
or
Facebook::PageFeedUpdateMailer.notify_comments(Facebook::Comment.all).deliver_now
Facebook::PageFeedUpdateMailer.notify_likes(Facebook::Like.all).deliver_now
Facebook::PageFeedUpdateMailer.daily_digest()
You might get an error about a from address, in which case you can run, for instance:
Facebook::PageFeedUpdateMailer.notify_comments(Facebook::Comment.all, from: 'sdash@adwerx.com').deliver_now
- Log in as an admin and go to http://www.adwerx.dev/sidekiq/queues/default
- Collect the payload for the applicable Workers::Facebook::IngestPageFeedUpdate job queued. It should look something like this:
{
"field"=>"feed",
"value"=>{
"item"=>"comment",
"verb"=>"add",
"comment_id"=>"1457371147_4",
"post_id"=>"1603988749878111_1700966186847033",
"parent_id"=>"1603988749878111_1700966186847033",
"sender_id"=>100008601228732,
"created_time"=>1457371147,
"message"=>"qi😱ht😱 lmi😱punay a😱Co",
"sender_name"=>"Jösh Bārds"
}
},
"1603988749878111",
1457371147
- open a rails console and run Workers::Facebook::IngestPageFeedUpdate.new.perform() You should now have that like/comment attached to your Facebook ad creative.