Sharing Buttons Code Problems

This is the code I have, the buttons will take you to the right place but for twitter it wont grab ever the name of the page and pinterest wont pick up the name or image so I am wondering what I have done wrong and how I can fix it

I am trying to get the image to use the one that the current dynamic page has and the page name as well

import wixLocation from ‘wix-location’;
let picture;

let url;

let filename;

$w.onReady( function () {

let link = wixLocation.url;

$w("#pinterest").link = `https://www.pinterest.com/pin/create/button/?url=${link}&media=https%3A%2F%2Fstatic.wixstatic.com/media/${url}?&description=${filename}`; 

$w("#twitter").link = `https://twitter.com/share?url=${link}?&description=${filename}`; 

$w("#facebook").link = `https://www.facebook.com/sharer/sharer.php?u=${link}`; 

let item = $w(‘#dynamicDataset’).getCurrentItem();

picture = item.image; 

url = picture.split("/")[3]; 

filename = item.note; 

});

export function pinterestShare_click(event) {

$w("#pinterest").target = "_blank"; 

}

export function twitterShare_click(event) {

$w("#twitter").target = "_blank"; 

}

export function facebookShare_click(event) {

$w("#facebook").target = "_blank"; 

}

export function downloadButton_click(event) {

wixLocation.to(`https://static.wixstatic.com/media/${url}?dn=${filename}`); 

}

export function twitter_click(event) {
//Add your code for this event here:
}

export function facebook_click(event) {
//Add your code for this event here:
}

export function pinterest_click(event) {
//Add your code for this event here:
}

Have a look at Nayeli (Code Queen) tutorial as this will help you with sorting out your code.
https://codequeen.wixsite.com/email-download/the-code
https://www.youtube.com/watch?v=BPMZzcfayUg