Jump to:

11003 Posts in 2735 Topics by 1824 members

All other Modules

SilverStripe Forums » All other Modules » Facebook Like Button

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2380 Views
  • karlevid
    Avatar
    Community Member
    10 Posts

    Facebook Like Button Link to this post

    The just launch Like Button for Facebook.

    http://developers.facebook.com/docs/reference/plugins/like

    But with this code your site will be liked no every single page. So it a need for a dynamic url. Something with "$page_url" I guess...

    I found this for WordPress

    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show-faces=true&amp;width=500&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:500px; height:60px"></iframe>

    Attached Files
  • banal
    Avatar
    Community Member
    901 Posts

    Re: Facebook Like Button Link to this post

    Use $AbsoluteLink ?

    Eg. put something like this in the template:

    <iframe src="http://www.facebook.com/plugins/like.php?href=$AbsoluteLink&amp;layout=standard&amp;show-faces=true&amp;width=500&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:500px; height:60px"></iframe>

  • karlevid
    Avatar
    Community Member
    10 Posts

    Re: Facebook Like Button Link to this post

    Perfect! Banal you are the man!

    Live: http://novainteractive.at/projects/

    2380 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.