Hey Guys,
i have a client who asked for an automated and free to use “Blogger Interview” Platform.
I created it using wix code and Dynamic Pages. Each dynamic page is an individual interview that has been approved by the admin. (This is working great)
Now i´m looking for Social Share Buttons that can be used for sharing dynamic pages.
The standard ones for facebook and so on are working, but not enough, as my client needs to have more share buttons and also nicer ones.
Hi,
Here’s a link to Facebook documentation to get a Share URL for Facebook (the URL Redirection section).
I recommend trying to create an onClick event and redirect to the Facebook link (described in the documentation) . In order to get the current URL page, you can use the Wix Location API .
I have an issue, the button works great but when I share the dynamic page in the thumbnail I have the image, but the description doesn’t appear in the thumbnail. Any suggestions? thanks a lot
I suggest looking for ‘Facebook Sharer Url Parameters’ in google to learn about what parameters can be specified for the url that I specified in the previous message.
I don’t knwo hot to integrate in my code, also the $w(’ #button1 ').link = https://www.facebook.com/sharer/sharer.php?u=${wixLocation.url}; is a template literals so I really don’t know ho to do that…
I’m truly sorry to say that but although I’m happy to give you guys a steer at the right direction, I can’t write your code for you. You can either try to learn some ES6 javascript and the meaning of Facebook Sharer API, or try to hire some help in Wix Arena .
Thanks you Pavel actually my button works with the Liran code but when I share my article by the dynamic page in the description I only get the dynamic URL of my page (Name Of My Page (Title)) but I’d like to have a customized description, this is my issue
Hi everyone - I posted this on the other dynamic page share button feed.
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
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.
I want to have social share buttons on my site. I did a test which doesn’t work.
On my test page (which is a dynamic page), I have an icon-button named facebookShare with the onClick event handler facebookShare_click , and here is the code, using the pattern provided by @wbburgin :
$w.onReady(function () {
import wixLocation from "wix-location"
)};
export function facebookShare_click(event) {
let url = wixLocation.url;
wixLocation.to(`https://www.facebook.com/sharer/sharer.php?u=${url}`);
}
When I run the code, nothing happens when I click on the icon. The icon seems to be un-clickable (no little hand/finger shown when I mouse-over the icon).
I didn’t include sharing to Facebook Messenger on my site, because I couldn’t make it working, got “Sorry, this content isn’t available right now” on PC, and “Content not found” on mobile.
Anyone who knows how to share to Messenger?