hi
code share facebook don’t work
import wixData from "wix-data";
import wixLocation from 'wix-location';
let link;
$w.onReady(function () {
link = wixLocation.url;
$w("#facebookShare").link = `https://www.facebook.com/sharer/sharer.php?u=${link}&display=popup`;
});
export function facebookShare_click(event) {
$w("#facebookShare").target = "_blank";
}
error facebook

aleksf
2
Hi,
.link is already a property that doesn’t need to be defined set a value. The following code should be enough:
$w.onReady(function () {
$w("#facebookShare").link = `https://www.facebook.com/sharer/sharer.php?u=${link}&display=popup`;
$w("#facebookShare").target = "_blank";
});
If the issue persists, please send a link to your editor and the name of the page where you wish to implement this.
I found error because link image repeat image://v1/ for og:image
should to be
https://static.wixstatic.com/media/image:/ab1a0f_1a921cd603f8411688095319e706fdda~mv2.jpg
https://static.wixstatic.com/media/image://v1/ab1a0f_1a921cd603f8411688095319e706fdda~mv2.jpg/1280_720/ab1a0f_1a921cd603f8411688095
319e706fdda~mv2.jpg/v1/fit/w_2500,h_1330,al_c/image://v1/ab1a0f_1a921cd603f8411688095319e706fdda~mv2.jpg/1280_720/ab1a0f_1a921cd60
3f8411688095319e706fdda~mv2.jpg
I used dashboard page to upload image
but when used upload by database work good
lee1
4
@aleksf He’s using his global link variable in the template literal. Your code retains that interpolated variable but you’ve left it undefined.
@lee1 could you give me an example