How to create and edit the social network sharing buttons

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
thuyengo
Forum Members
Forum Members
Posts: 10
Joined: Wed Feb 22, 2017 7:12 am

How to create and edit the social network sharing buttons

Post by thuyengo »

Hello all member!

Here is my site:

Code: Select all

http://www.kateatkinsonmakeupartist.co.uk/blog.html
As you can see, each blog post has a Facebook share button at the bottom. However, when any of these buttons is clicked, the link tries to share the whole page and uses the thumbnail of the first blog post.
I have looked through all the documentation but I can't figure this out: how is it possible to share just the blog post and the post's thumbnail?
I have also tried adding the CGSocial Blaster and CG Facebook Post modules (the former appears in the list of the blog posts) but again I cannot make it work successfully.
I get the warning: "We do not have user, or page credentials to allow us to post to a facebook page".
Is there a simple step-by-step guide that I can follow?
Regards!
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: How to create and edit the social network sharing button

Post by velden »

For sharing individual articles you will need to learn a little about the Open Graph metatags (you should do that anyway). You will need to understand how Facebook retrieves the information from your website.

I think you kind of need a detail page per blog article. What else could Facebook do now but sharing the whole page?

In the detail page template you setup the meta tags: https://www.cmscanbesimple.org/blog/bas ... d-metatags

It's not required to have the detail pages but then you need to 'trick' Facebook into sharing a unique url for your page which renders specific meta tages.

I did it here: https://tinyurl.com/jy4yyay not for blog articles but for photos. Note the different urls it uses in the facebook share button for every picture.
If you try the ?img=xx parameter on the url you can see in the page source the meta tags will differ per id.
Post Reply

Return to “Modules/Add-Ons”