Forum
Facebook share blog post button
Hi,
I'm keen to have a share button for a specific blog post both from the news page which lists 10 recent posts and also from the post page.
Can you shed any light on how to do this?
Using a template I tried this:
<div class="fb-share-button"
data-href="https://stanmore.menczykowski.co.uk/news/news-post.php?s=<perch:blog id="postSlug" type="text" />"></div>
But the URL did not work.
Similar to implementing a like button (I searched for "Facebook" in the docs)
https://solutions.grabaperch.com/integrations/adding-facebook-like-buttons
Thanks,
However the like button does not get the full current URL. It gets:
What comes after the ?s= - the slug - is crucial to make the URL work.
What is now in your template?
Simply:
The current page url example for a post would be:
https://dev.stanmore/news/news-post.php?s=new-positions-available-at-stanmore
That looks more like a Facebook issue than a Perch one. In that page we also detail how you can set the specific URL you want.