Improve social sharing to show correct video previews
Update social share buttons and copy link functionality to use a dedicated sharing URL that generates correct Open Graph metadata, ensuring proper video previews on platforms like Viber, WhatsApp, and Facebook. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 401e2ec0-e00d-4f10-9d0e-60f3d479f9a5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 3aacafcb-8b62-4afe-9c7a-6328489a2590 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/401e2ec0-e00d-4f10-9d0e-60f3d479f9a5/EadCoxV
This commit is contained in:
parent
d702afb056
commit
7b41f8a87c
@ -324,7 +324,7 @@ export default function VideoPage() {
|
|||||||
|
|
||||||
const copyToClipboard = async () => {
|
const copyToClipboard = async () => {
|
||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(getShareUrl());
|
await navigator.clipboard.writeText(getFacebookShareUrl());
|
||||||
const notification = document.createElement('div');
|
const notification = document.createElement('div');
|
||||||
notification.textContent = 'Link kopiert!';
|
notification.textContent = 'Link kopiert!';
|
||||||
notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg z-50 transition-opacity duration-300';
|
notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg z-50 transition-opacity duration-300';
|
||||||
@ -745,13 +745,13 @@ export default function VideoPage() {
|
|||||||
Facebook
|
Facebook
|
||||||
</div>
|
</div>
|
||||||
</FacebookShareButton>
|
</FacebookShareButton>
|
||||||
<TwitterShareButton url={getShareUrl()} title={`Watch "${currentVideo.title}" on video.folx.tv`}>
|
<TwitterShareButton url={getFacebookShareUrl()} title={`Watch "${currentVideo.title}" on video.folx.tv`}>
|
||||||
<div className="w-full px-4 py-2 text-left text-white hover:bg-gray-700 flex items-center gap-2 cursor-pointer">
|
<div className="w-full px-4 py-2 text-left text-white hover:bg-gray-700 flex items-center gap-2 cursor-pointer">
|
||||||
<TwitterIcon size={16} round />
|
<TwitterIcon size={16} round />
|
||||||
Twitter
|
Twitter
|
||||||
</div>
|
</div>
|
||||||
</TwitterShareButton>
|
</TwitterShareButton>
|
||||||
<WhatsappShareButton url={getShareUrl()} title={`Watch "${currentVideo.title}" on video.folx.tv`}>
|
<WhatsappShareButton url={getFacebookShareUrl()} title={`Watch "${currentVideo.title}" on video.folx.tv`}>
|
||||||
<div className="w-full px-4 py-2 text-left text-white hover:bg-gray-700 flex items-center gap-2 cursor-pointer">
|
<div className="w-full px-4 py-2 text-left text-white hover:bg-gray-700 flex items-center gap-2 cursor-pointer">
|
||||||
<WhatsappIcon size={16} round />
|
<WhatsappIcon size={16} round />
|
||||||
WhatsApp
|
WhatsApp
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user