We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question, Problem, Blog

Facebook share blog post button


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="http://stanmore.menczykowski.co.uk/news/news-post.php?s=<perch:blog id="postSlug" type="text" />"></div>

But the URL did not work.

Adam Menczykowski

Adam Menczykowski 1 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Similar to implementing a like button (I searched for "Facebook" in the docs)



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.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

What is now in your template?


<div class="fb-like" data-send="true" data-width="450" data-show-faces="true"></div>

The current page url example for a post would be:


Drew McLellan

Drew McLellan 2638 points
Perch Support

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.