Topic: Help to implement Facebook like button on a current page

I am trying to implement Facebook like button using the iframe code  but the challenge I am facing is how to write a ruby code  to fetch the current page. Here is the facebook iframe code;
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>

I am simply trying to replace the url with the current page url

Last edited by bkirato (2010-07-01 12:52:20)

Re: Help to implement Facebook like button on a current page

refer this link

http://stephan.com/blog/really-easy-fac … -for-rails