Sharing canvas on Facebook or Twitter

572 views Asked by At

I am trying to share canvas element on Facebook or Twitter. I would like to share only this element as image from client side without using any URL but canvas.toDataUrl. Is it possible to create html link with canvas toDataUrl and post it using the way from the code? Or there is some other solution?

document.getElementById('shareBtn').onclick = function() {
  FB.ui({
    method: 'share',
    display: 'popup',
    href: 'https://developers.facebook.com/docs/',
  }, function(response){});
}

0

There are 0 answers