javascript - facebook social plug-in not showing up when added dynamically -


i adding facebook social plug in webpage

when manually add :

<div class="fb-comments" data-href="http://website.com/z" data-width="700" data-numposts="7" data-colorscheme="light"></div> 

it works , , when javascript code add , doesn't

any ideas ?

the js sdk goes through document once when initialized, such elements parse social plugins. if want parse content add document later, need call fb.xfbml.parse().

https://developers.facebook.com/docs/reference/javascript/fb.xfbml.parse/


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -