I am trying to use a Facebook Like button via an iFrame, like so:
<iframe id="test" src="http://www.facebook.com/plugins/like.php?
href=http://yoururl.com/&
layout=button_count&
show_faces=false&
width=50&
action=like&
colorscheme=light&
height=21"
scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:50px;
height:21px;"
allowTransparency="true">
After a user clicks “Like” for the first time, I want to execute some Javascript in my DOM content. How would I go about doing this?
You mean you want to execute some Javascript when you like something?
You can use the Facebook Javascript SDK for that, especially the
edge.createevent.See
This should work with the IFrame-version too. If not, you have to switch to the XFBML-Like button. It definetly works with the XFBML version.
Example: