Can’t seem to find a solution to sharing single images from a gallery. I use an external lightbox plugin, which works great, except the share option is broken and they seem to have gone bust. 🙁
What I was after anyway, was an option to share before the lightbox, a button underneath the images etc. I tried the mpp social share plugin, but that is just sharing the main site URL.
On further checking the mpp social sharing plugin, is sharing the correct url but it has no image to share, so it uses the default sharing image. If you’re going to share a gallery it would be far better to share using an image from the gallery, not some random default image. Seems to be a feature needed really. If there are other options to share single images, or galleries properly, could someone let me know?
Please try the latest plugin I have made some changes to it and let me know.
Thanks for your reply, and the latest changes, it certainly works better now and it does share the right URL and items, but the open graph data isn’t there, as a result it only shows a default image (not the mediapress one) and a default description/title. Would be much better if it could show the actual image being shared, or one from a gallery being shared, along with the title/description of the image or gallery.
Is there any way to do this ?
<meta property="og:image" content= "https://path.to/mediapress/image.jpg" />' (whatever the link to the image would be) and
<meta property=”og:title” content=”name of media” />
<meta property=”og:description” content=”description of media if added etc” />`
Did you try debugging the url?
I am sure, we add the og meta properly.
Here is the example
I did debug the URL, and you’re right it does show the meta, I use a browser extension that shows the meta for a page, and it points to the right image, and the right url with proper description. However, when I share that on facebook, it still puts a default description and a default image 🙁
At first I thought it was my SEO plugin as that outputs og meta, so I disabled that, and the problem persists. Kind of driving me crazy how the page source shows the correct meta, but facebook (even on a non cached page) still shows default images.
After a lot of debugging, I think the problem lies in the fact the URL passed to facebook is correct but the canonical URL is set to the homepage.
So when the fetched URL matches the canonical URL everything works (this is on my regular posts with featured images).
For some reason though the URLs for the galleries, and the media images in Mediapress, the fetched url and the canonical are different, the canonical being set to the homepage. So am guessing facebook goes there for the info. How can I fix that? Or any idea why it’s doing that ?
That could be a possible reason. Please allow us to check tomorrow and get back to you.
The strange part is, It worked for us. Which SEO plugin are you using? May be we will need to add a filter to generate proper canonical link for it.
Ok Brajesh, and thanks for all your help.
The SEO plugin I’m using is The SEO framework
No idea why the two links aren’t matching, are they matching on yours? I could test a fix to see if that works if you have a quick solution and let you know? I don’t really understand canonical, I just know it works when the two links match and it doesn’t when they don’t.
You must be logged in to reply to this topic.