0
I have a Facebook app where I get a picture of the user’s profile. How to paste this image over another one by making a montage to be then shared on fb itself. The canvas toDataURL method does not work because the image is on another server. I need some plugin or something like?
Friend, from what I saw here, the toDataUrl method of canvas, has no domain restrictions. When you try to use it, which error is triggered on the console?
– LF Ziron
Does not trigger any error, only the image does not appear
– Fabio Ferreira
from what I have read, this restriction occurs so that there is no copying or falsification of copyright images or anything like
– Fabio Ferreira
You’re right. From what I saw here, the solution would be for you to use a server, in backend you wouldn’t have that kind of restriction
– LF Ziron
LF Ziron how so? You have some link where I can learn to do this?
– Fabio Ferreira
I solved the problem. Just do: img.crossOrigin = "Anonymous";
– Fabio Ferreira
Create an answer to your question with this information, so when another user has the same question, they will find a solution more easily
– LF Ziron