Social Share buttons on WIX Dynamic Pages

Unable to implement social share tools like ShareThis or AddThis on Wix Dynamic Pages (how to pass dynamic URL to the widget?) I’m using HTML iframes, as I’m not to sound in coding to use corvid. Please help.

For ShareThis, what do I need to pass as data-url in a wix dynamic item page?

Thanks

https://www.addthis.com/academy/how-to-install-the-addthis-code-on-a-wix-site/
https://www.addthis.com/support/

https://sharethis.com/support/installation/how-to-install-share-buttons-wix/
https://sharethis.com/support/
The instructions with the images displayed tell you to add the html code all to the same html iframe on your page.


Yet the actual code image tells you to add the first block of code to your head tag and to do that you need to add the first chunk of code into the head section of a new tool in tracking and analytics, that is not shown in the tutorial images for it, just the adding of all the code in a normal html iframe on your page.
So where it says this for number 1 of your code to paste the code into the head tag of your site, you actually should do the following tutorial.
https://support.wix.com/en/article/embedding-custom-code-to-your-site

Also, your code from addthis or sharethis, if it isn’t just html script for embedding a form and it is actually a widget type form that you are trying to use in Wix then there could be problems.

If it is a widget type style of form, then you won’t be able to use it without complications as seen in this previous post here.
https://www.wix.com/corvid/forum/community-discussion/resizing-mobile-google-calendar-embedded-on-wix-site

Aso, note that Wix does not provide support for any third party code that it has not had the chance to fully test and check that it works on their own servers etc.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site
Important:
We cannot provide support for external codes that were not created or tested with Wix. If you are experiencing an issue with your code snippet, please contact the provider directly.
Testing Your Code
Keep in mind that by adding external HTML code you are adding products and code that we have not tested or created at Wix. Therefore, we cannot answer any questions or concerns regarding the code.

So, if you can’t get it working with Wix, then you would be best speaking to their customer support again and enquiring about their own API services that you can use instead.

For API info see here along with Wix Fetch and Wix HTTP Functions
https://www.addthis.com/academy/developers/
https://sharethis.com/social-share-count-api/

https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api

https://www.wix.com/corvid/reference/wix-http-functions.html
https://support.wix.com/en/article/corvid-exposing-a-site-api-with-http-functions

Just search the forum for previous posts about social too…
https://www.wix.com/corvid/forum/community-discussion/social-sharing-for-dynamic-pages

https://www.wix.com/corvid/forum/community-discussion/share-buttons-for-dynamic-pages

https://www.wix.com/corvid/forum/community-discussion/sharing-buttons-on-dynamic-pages#targetText=You%20can%20just%20add%20the,the%20add%20menu%20%2D%3E%20social.&targetText=I%20would%20really%20need%20to,in%20the%20%22sharing%20dialogue%22.

If you are wanting to pass data from your page to your widget or from your widget to your page, then you will need to look into using the HTML Component.

How do I send data between my page and an HTML Component?
You can send and receive messages between your page and an HTML Component using the postMessage() and onMessage() functions.

https://www.wix.com/corvid/reference/$w.HtmlComponent.html
https://support.wix.com/en/article/corvid-working-with-the-html-element

Ok! I found the EASIEST solution to this! Huge relief!

All we need to do is paste the code (of ShareThis or AddThis etc.) NOT IN THE HTML IFRAME IN EDITOR, but in the Tracking & Analytics section of the dashboard. This section has an option to add custom code to select pages. I added the ShareThis code to the head section through custom code, and everything works perfect! Hope someone else benefits from this trick!

Not really a trick that you have just found, it was already a way to add code to site through Tracking and Analytics, other than using the HTML iFrame on your page!

You can also use that method for other tools from Facebook or Google or Microsoft or Norton for example and place your code in the head, body or foot section either on all pages or on just selected pages.
https://support.wix.com/en/marketing-tools-analytics/marketing-integrations-tracking

It was even mentioned in my reply as well.
Yet the actual code image tells you to add the first block of code to your head tag and to do that you need to add the first chunk of code into the head section of a new tool in tracking and analytics, that is not shown in the tutorial images for it, just the adding of all the code in a normal html iframe on your page.
So where it says this for number 1 of your code to paste the code into the head tag of your site, you actually should do the following tutorial.
https://support.wix.com/en/article/embedding-custom-code-to-your-site

Plus, don’t confuse this with script codes for meta tags that are placed on your SEO side of the website.
https://support.wix.com/en/article/adding-seo-page-titles-and-descriptions-meta-tags
https://support.wix.com/en/article/adding-custom-meta-tags-to-your-site

However, glad that you have got your code working now through your little trick. :wink:

Wonder why people can’t just give you the easy answer first and save you time and energy! There are several of us here who aren’t great at coding, and use wix for it’s intuitive interface. Small business owners who’s core work is NOT coding! It took me HOURS to figure this one out, but 5 min to implement once the instructions were clear. Just hoping that by stating the ‘trick’ clearly and compactly, I save someone else their time! I don’t intend to ever really invent any ‘trick’ in coding… only discover useful little things. I understand that the programming folk love to know all details and options, but not all of us here get it! We need simple solutions. For example, I’m a doctor, not a coder! Anyway, thanks to all who shared inputs! Get yourself some more whiskey :wink: