最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Initialize Facebook like button post page load and script execution - Stack Overflow

programmeradmin6浏览0评论

So I have a like button on my page which loads fine when the script is executed in the bottom of the page. The problem is that I have an Ajax based popout which renders some HTML that also has the like button. How can I initialize that?

I've tried putting same script, but it doesn't get executed.

Is there a way to explicitly call any method to initialize the button?

So I have a like button on my page which loads fine when the script is executed in the bottom of the page. The problem is that I have an Ajax based popout which renders some HTML that also has the like button. How can I initialize that?

I've tried putting same script, but it doesn't get executed.

Is there a way to explicitly call any method to initialize the button?

Share Improve this question edited Aug 25, 2012 at 20:17 Peter Mortensen 31.6k22 gold badges110 silver badges133 bronze badges asked Feb 7, 2012 at 19:12 DaniyalDaniyal 3411 gold badge4 silver badges12 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 21

FB.XFBML.parse() will do the trick

发布评论

评论列表(0)

  1. 暂无评论