user1111164
user1111164

Reputation: 3

Displaying the 'like' button in a Javascript pop-up

My web site uses iBox (http://www.enthropia.com/labs/ibox/) to display information that I would like users to be able to share using the 'Like' and 'Send' buttons.

I have included the proper javascript and html for the 'like' button on both the parent page and the pop-up page, but the 'like' button itself (the xfbml in the pop-up page) does not appear at all.

I have tried different combinations of including the javascript and the fb-root div in both the parent and pop-up pages, but nothing seems to be working. Has anyone done this? Is there something else I should try? Viewing the pop-up page directly does reveal the 'like' button, but it does not show up in the pop-up.

Code from the pop-up HTML:

<span id="fblikebutton">
    <fb:like action="recommend" show_faces="true" width="450" send="true" href="http://..."></fb:like>
</span>
<script type="text/javascript">
    FB.XFBML.parse(document.getElementById('fblikebutton'));
</script>

Upvotes: 0

Views: 1334

Answers (1)

Semun Lee
Semun Lee

Reputation: 191

If you are adding popup dynamically, you might need FB.XFBML.parse() call after you add the XFBML like button.

http://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/

Upvotes: 1

Related Questions