Archived topic
Facebook "Like" and "share" buttons
6 replies · Started by Ram on October 13, 2018
Hi, I tried to include facebook "like" and "share" buttons on my blog posts using the hook "before_header". But it's not working.
As per Facebook instructions, the code within the <scrpt>..</script> tags had to be pasted on every page, just after the <body> tag.
I checked the page source code in the browser (for the posts), and I found that the required code (added through hook) is present in the body tag of html. but still the buttons are not appearing on the page.
there is no problem with the facebook code. I tried that on another theme and it’s working fine with that theme.
Please help.
just to add further... there is no problem with the facebook code. I tried that on another theme and it's working fine with that theme.
Hi there,
The URL provided doesn't like to a site built with GP?
I had restored my previous version for a short while to check something, which is not using GP. My bad luck that you visited during this period. Please check now.
Thanks for your effort.
so the script is in place but where are you outputing the HTML for the button?
See here:
Thanks for all your help. this is resolved. I added another hook with the following code and it worked.
<div
class="fb-like"
data-share="true"
data-width="300"
data-show-faces="true">
Glad i could be of help