Skip Navigation

[Resolved] Social Share icons …

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by smileBeda 3 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1868721
Settings of share block.png
product on share screen.png

I am trying to:
Add social share icons

I expected to see:
When pressing the share icon, I expected the content shared as set in the backend (see screenshot, this includes dynamic url, title, excerpt, image)

Instead, I got:
A share content with correct link, but wrong image, no excerpt and wrong heading, see second image
(it says "some short" as title, whereas it should give the title of the post, and the image/excerpt are not there either.

Any idea what I am doing wrong?
I am using latest legacy toolset plugins (not blocks plugin but I use blocks with views plugin... duh)

#1868913
backend.png
Screenshot 2020-12-08 at 20.40.02.png

I don't get it.
On another post, it displays ... well, whatever, total gibberish.

Something what seems to be the excerpt (used in the title instead of the post title), but then it adds... "Do it".
Do it??

I never added such string anywhere to any post, neither "Some Short" 😀

This is truly strange. Also, in the other tests my excerpt, image and title are not used.

Perhaps I am misunderstanding how social sharing works?

Whats best?
In the backend, where I will never use it, it works (At least, the Title - the rest still does not really work properly)
See second screen, named "backend".
Why is this even working in the backend? 😀 😀
I wouldn't know of any situation where I want to share a post when editing a CT.

Truly mesmerising 😛 these social networks...

#1869453

Hi there Beda, I have another recently escalated ticket with an image issue in the Social Sharing block already reported:
https://toolset.com/forums/topic/social-share-block-not-working-correctly/
In that ticket, an image from a custom field dynamic source doesn't work on some of the sharing networks like FB or Email. Sounds related to one of the problems you described. There's also an issue with text formatting from a multiline field, FYI. I suspect there are other issues, as you noticed. I'll take a closer look at the other issues you mentioned and give you an update tomorrow, as my day is closing here.

#1870787

I'm asking for clarification on the FB sharing interface because, I'm not sure which elements of the shared post UI are expected to be modified by the dynamic content, and whether or not it should even be expected to work in a local test environment where FB's crawler cannot access the local post's OG tags.

However, the "Some short" and "Do it." texts are baffling to me, I haven't been able to replicate those in a similar scenario. I've tested both with and without explicit post excerpts using Views with the Block Editor active, but I cannot replicate that problem. I've scanned our codebase for the text string "Do it." with no matches. I queried post contents in my DB and all the options in wp_options as well, but no matches found for "Do it." I'm wondering if this could be interference from a theme, plugin, or other custom code - have you tested in a Toolset-only environment without any custom code active?

#1871225
Screenshot 2020-12-10 at 12.04.40.png

Hello Christian, I am so sorry!
The weird text indeed turned out to be in the Product Post Description. For some reason I did not see them, even thou I looked.

So now the situation persists as so:

1. In the backend, it correctly shares the TITLE on the post (as seen in the previous screenshots). However it still persists on the site logo for the image, my title is not added. But then, IMO in the backend this should really just be a placeholder and not working when clicking the share button. I am not even sure this is safe, given the history of Facebook of snooping data, I have no idea but I could imagine they are able to access the screen you share from, and in this case it would be the WP Backend. Which me personally I'd not want, and I really don't see the advantage of a functional share button in the backend... But let that be - it's just a quirk.

2. In the front end, instead of the Title it shares the excerpt, which is generated in my case from the post content (so that's why the mysterious strings, they where what seems placeholders in the post body(ies).

The site is online, so it should not be an issue with accessibility.

For us, here the most important right now (now that we know what the strange strings are) is the Featured image.
It would be really important that this setting is respected.

Note:
This is a WC Product Content Template. I did not test this on a normal post, and I did not test this on a clean slate, I did not have time for that yet.
I tested it on a other site though where everything is working smooth and there I got even worse results, the shortcode did not expand at all, see screenshot.
And it also clearly shows, it tries to share the [tb-dynamic provider='__current_post' post='current' source='post-excerpt' force-string='first' ] (excerpt) in the place where if shared from the backend it places the title.

Now, this might be expected, and the title would then be what we see in the actual "card", speak, the link text.
I also tested the Facebook debugger (they offer such a service) to see how it should look, and pretty much the same is the output as with Toolset, just that it tries to fetch OG data, which in Toolset case it shouldn't, since we have settings to force the image, title and descriptions.
It seems that exactly this is the issue, it still fetches OG data even we set the sources in the backend with Toolset, which should overwrite the OG Tag instructions, I believe, at least for Image, Title and Description.

I also tested with other dynamic settings and could confirm, it successfully respects the only thing that Facebook will NOT grab automatically, which is the text before their share card, which I assumed should be title but is the "Excerpt", that is working.
We can set it to anything in the Toolset blocks and it will reflect in the share

However, the title and image are not, they always default to what OG delivers to FB.

Sorry again I made you waste time with the "Do it" strings 🥲

#1871681

Got it - thanks for the extra info. I'm still waiting for more information about what is expected here, and hope to have an update for you soon.

#1920673

Hi I have some feedback from developers:

...about Facebook specifically, it’s API only accepts URL and “quote” parameters. For URL, we send “Dynamic URL Source”, and for quote, we send “Dynamic Title Source”. Some other social networks can accept “Dynamic Excerpt Source” and “Dynamic Image Source”, but not Facebook. They just take what they like from the provided URL.

And some feedback from 2nd tier:
...from Ivan’s reply it looks like the API for spoon-feeding facebook directly is very limited, and a richer experience would be had if the posts themselves had og meta tags populated with the relevant data, and facebook would then suck in content as needed.

But we evidently don’t add such tags, hence the sparsity of what is shown when sharing.

Clients can use 3rd party plugins such as Yoast which will populate the og meta tags (except https://toolset.com/errata/yoast-stopped-analysing-types-custom-fields-with-14-6-update/), so I guess the “solution” is that you add social sharing buttons with our block, but use a 3rd party plugin that generates og meta tags to give richer previews.

#1935049

Probably then the settings shouldn't be available, please see my previous posts, it is all happening with simple point and click, I am never warned, or hindered in doing what I did.

Perhaps a doc entry would do it, however I believe just saying "it is expected" while offering the options (which then do not work) is a bit strange, IMO.

Anyway, the client switched plugin and doesn't use Toolset anymore for several other reasons additionally to this report here (for example, his Blocks built CTs constantly lost styles and he got angry on that), so for me, case closed.