You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am trying to add facebok like putton to my confluence page.
Facebook developers gives the code:
http://developers.facebook.com/docs/reference/plugins/like/
I tried to add html using html-include macro, but it doesn't work :S
I want to add social links like atlassian blog does.
How can I do this? Please help.
Thanks for answers.
See this reference:
http://developers.facebook.com/docs/reference/plugins/like/
Adapting the HTML5 version of the generated code...
Browse to Confluence Admin | Look & Feel | Custom HTML
In At the end of HEAD, paste:
<script> AJS.toInit(function(){ var fbLike = '<div class="fb-like" data-href="' + window.location.href + '" data-send="false" data-width="450" data-show-faces="true"></div>'; var fbScript = '<div id="fb-root"></div><script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</' + 'script>'; AJS.$('.wiki-content').append(fbLike); AJS.$('body').prepend(fbScript); }); </script>
You should now be able to like and also post to FB:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that looks kinda weird. I've made a minor edit to the script and it's working good for me on Confluence 4.2 using Google Chrome and Safari on a OSX Lion.
This approach may be better than the answer by @Bahar Çağlar because it automatically will embed the like button on all Confluence pages/blogposts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.