通过 Pinterest 分享会抛出错误“无法在‘DOMWindow’上执行‘postMessage’”

问题描述 投票:0回答:0

我正在尝试在我的网站上实现共享内容。我使用反应共享库。当我尝试通过 pinterest 分享时,它不起作用。相反,它抛出这个错误

我也尝试过使用带有共享链接和参数的标签,但得到了同样的错误

<a
className="resp-sharing-button__link"
href={`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(
// window.location.toString()
'http://localhost:5173/player/6374f1505c63b4d92e84021d'
)}&media=${mainImageToShare}&description=Super%20fast%20and%20easy%20Social%20Media%20Sharing%20Buttons.%20No%20JavaScript.%20No%20tracking.`}
target="_blank"
rel="noopener noreferrer"
aria-label="Share on Pinterest"
>
Share on Pinterest
</a>
javascript html reactjs typescript pinterest
© www.soinside.com 2019 - 2024. All rights reserved.