I’m hoping someone can actually help with this.
I’ve tried the Wix share buttons, ShareThis, and AddThis. None work on the Dynamic pages. Anyone have any ideas?
I’m hoping someone can actually help with this.
I’ve tried the Wix share buttons, ShareThis, and AddThis. None work on the Dynamic pages. Anyone have any ideas?
Any help that can be offered Wix?
Hi Jay at Sync!
For myself, I did this (with help from another coder) on a dynamic item page. You can add a custom facebook and twitter image (I found mine online and uploaded into my wix gallery). You open can then open the properties panel and change the image id to “facebook” and “twitter” respectively (or whatever you want to call them).
Then in the code panel you’ll need to import the wixLocation, then let url = wixlocation.url, then export the function, then you’ll create individual elements, eg:
$w('#facebook').link="https://www.facebook.com/sharer/sharer.php?u="+url+"%2F&src=sdkpreparse";
$w('#twitter').link="https://twitter.com/intent/tweet?text="+url+"%2F&src=sdkpreparse"; }
Then, once you get that to work, go to your dynamic page’s SEO settings, and assuming you have an image field in your database, just add your databases’ desired image field under “What image do you want to share on social?” You can also edit the page description to a default description or also connect it to a field in the database. Fyi, you’ll have to visit your published site to view the dynamic image share working.
You will have to look up each social media’s site’s individual instructions to create a custom share link. Just google “Facebook share developer” “Twitter share developer” “Pinterest share developer” etc.
For example here is the twitter one:
And for facebook (scroll down to url redirection - currently your best option):
If you need AddThis widget you can use " Tracking Tools & Analytics " - copy and paste code snippet there. https://support.wix.com/en/article/about-tracking-tools-analytics
You can set it to be on all pages or only on a specific dynamic page.
How does one set it to be on a specific dynamic page? I want it on all pages on the site but on dynamic pages it just shares the first listing.
Hello ashleyfordesigns,
I followed ur steps but I am only getting the link of my website in the Facebook share page. Do you know what I am doing wrong.
I wasn’t able to get it to work either Nithin.
Hey Jay,
But if you look at this link https://www.gregmichie.com/Listing/21-Oakfield-Drive
you are able to share the link along with a image using the fb share button. I want to achieve this with a button designed by me. But I am not able to do it. Can you help me regarding this.? If it snot possible by a custom button, how are u doing it with the fb share widget?
update : I just noticed that the image is not shared always in your other listings. Sometime its working perfectly and some times not. Can anyone at wix tell us why is it so?.
Hey Nithin and Jay!
So, interesting. On my one dynamic item page, my code works perfectly and shares to facebook but on another dynamic item page, the exact same code does not work. I have no idea why.
Jay, I checked out your site and it looks to me like everything is sharing correctly, dynamic content and all! Did you find a solution?
I haven’t been able to get AddThis or ShareThis to work. I used Wix buttons and some tinkering with the settings.
It doesn’t work perfectly as Nithin said. We’re still working to figure this issue out. AddThis and ShareThis have been zero help and have just stopped replying to emails all together. Wix has also been less than forthcoming with advice and a fix. This is a pretty standard feature so I can’t believe it’s this hard to implement.
Between the 3 of us here we hope to find a fix. I’ll update if we do since it seems like Wix is disinterested.
AddThis and ShareThis have now confirmed they cannot get their share buttons to work on Wix Dynamic Pages. So now what do we do? Such a basic request and so critical to the success of a site.
Need:
I’ve managed to accomplish Facebook so far but it doesn’t always display an image and I can’t tell my client to Facebook debug every single page on their site. They add 5 pages minimum a week.
Jay at Sync I have the same problem… if you find a solution, pls let me know…
nerd bump
This article is from a year ago, yet there is still no simple way to add a social share button on dynamic pages. Those little tiny share icons on the Wix blog are worthless! If there is not expected to be any movement on simple social share buttons for dynamic pages then at least let us customize those tiny little icons on the blog - I want to make them so they are actually noticeable! Even the comment box is so blended in that it is hardly noticeable.
I am really baffled as to why some of them simplest things are missing from Wix. Couple months ago as I was building my site visually, I was loving Wix! Now that I really start to drill down and customize the site from a functional perspective I realize just how big the Wix limitations are – simple things like this just shouldn’t be an issue.
Hi everyone - here’s a solution. You use the wixLocation API to get the current page and forward it to the sharer url of the social media service you wish.
Page log, corvid:
import wixLocation from “wix-location”
//Facebook
export function image12_click_1(event) { let url = wixLocation.url; //get the current page url wixLocation.to(https:](http://wixlocation.to/) [//www.facebook.com/sharer/sharer.php?kid_directed_site=0&u=${url}
); }
//I used an image I found online of the Facebook logo, do it for every social media service you wish. Make sure that you have created the click event by going to “properties” of your page element - important! // this says “kid-directed site” per FB’s policies - you can change if you wish
//copy the dashes before and after the url
//LinkedIn export function image13_click(event) { let url = wixLocation.url; //get the current page’s url wixLocation.to(https:](http://wixlocation.to/) [//www.linkedin.com/shareArticle?mini=true&url=${url}&title=Waves%20Of%20Paper&source=wavesofpaper.com
) } //replace my website with yours, the %20 represents a space. For any of these social media directs, you can add specific parameters/objects as needed (title, source, etc.). However, make sure they work on the sites you choose, because certain variables and objects are referenced by different names for certain services.
//twitter export function image14_click(event) { let url = wixLocation.url; //get the current page’s url wixLocation.to(https:](http://wixlocation.to/) [//twitter.com/share?ref_src=${url}&source=wavesofpaper.com
) }
You can do the same template for any and all social media with a share url (i.e. practically everything but Instagram and non-web interfaces), but each share url per social media company will be slightly different. Look up their share button APIs if they have one.
You can then make a social media bar and pin it to the screen - it can be designed with whatever logos/size/colors you so choose. Very design-friendly and much better than what’s given.
It took a bit of tinkering around on my part, but I was surprised by how simple the solution is. I really hope this helps you all - don’t hesitate to reach out if you have questions or issues with this. Worked for me & I know how frustrating it can be, believe me.
Walker
Hi, everything works except Facebook sharing. The error appears " href should represent a valid URL". So, is there a solution for this? Besides is there a possibility to have mail sharing? (when you click an envelope icon and share a page or post to someone you want by mail).
Hi Saule!
Could you paste your code so I could see? I’ll look into if facebook changed their sharing link, and maybe double check if you replaced “url” in the sharing link with your website. I’m thinking that because the sharing link is dynamic, “url” should maybe be left as “url“ instead of the actual website link.
Keep me updated! Happy to help.
Best,
Walker
Hi, off course,
import wixLocation from “wix-location”
export function facebook_click(event) { let url = wixLocation.to(https: //www.facebook.com/sharer/sharer.php?u=${url}&display=popup
) }
The only thing I can think of is maybe you haven’t created the click event in the properties panel? Everything else looks ok