Q:

Fb Like in Ember App

In my ember app I am trying to add fb like button. I have this flow.
index -> select Image -> pay -> thank you page
In my thank you page I am trying this fb like code
<div class="fb-like" data-href="https://www.facebook.com/Postify.Postcards" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>

The problem is when I am coming the above mentioned flow it doesn't show a like button. But when I am on thank you page and the refresh then it shows the fb like button.
Any thoughts?

A:

Facebook parses the page on page load for instances of Facebook items, since you're dynamically adding it after page load it doesn't catch it.  You'll just need to re-parse the page, or re-parse that item when you hit a template where that applies.
https://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/
Something like this would be the way to solve it.
App.ThankYouView = Ember.View.extend({
  setupFbLike: function(){
     FB.XFBML.parse();
  }.on('didInsertElement')
})

