How to add Facebook Like button to transformation

HelenaG Grulichova asked on March 30, 2012 07:10

How to add Facebook Like button to transformation

Correct Answer

HelenaG Grulichova answered on March 30, 2012 07:10

If you want to display the Facebook Like button for every single item in your repeater (or in any other web part, which uses a transformation), you can simply paste the following Facebook-generated code into it (please make Facebook clickable -> https://developers.facebook.com/docs/reference/plugins/like/). All you need to do is to generate a unique URL for each item (for example by using the GetDocumentUrl() function):

<iframe src='//www.facebook.com/plugins/like.php?href=http://yourdomain.com<%# GetDocumentUrl() %>&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&font&height=35' scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>

-jh-
0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.