I managed to add a Like Button and a Facebook Comment on my google site.
To do so I had to develop a custom Google Gadget that embeds the javascript code.
That’s not so complex.
What was less simple, was to find the code to get the page url where the gadget is embedded.
I found it on stackoverflow (thanks to Vaibhav) :
var url = (window.location != window.parent.location) ? document.referrer: document.location;
You can see the result here (go to the bottom of the pages):
- Facebook Like : http://www.appepaper.com/
- Facebook Comment : http://www.appepaper.com/ereading
Can you please write the whole code? I’m tring to make the same gadget and don’t know where to put the code you wrote.
Thanks