Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Facebook Like Button


Go to End


3 Posts   3135 Views

Avatar
karlevid

Community Member, 10 Posts

23 April 2010 at 10:34pm

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
Avatar
bummzack

Community Member, 904 Posts

23 April 2010 at 10:39pm

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>

Avatar
karlevid

Community Member, 10 Posts

23 April 2010 at 11:02pm

Perfect! Banal you are the man!

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