Html imessage pre-populate body

In my webapp, I have an html anchor that runs iMessage on Mac using Safari, the precedent is to fill in the body of the message and just select the user for the recipient. The trigger works fine, but the message body does appear in the To field:

<html>
    <a href="imessage://&body=THIS IS THE BODY OF A MESSAGE">
      THIS IS A LINK
    </a>
</html>

On iphone, this works:

<html>
    <a href="sms://&body=THIS IS THE BODY OF A MESSAGE">
      THIS IS A LINK
     </a>
</html>

I tried several other delimiters besides ampersand like; or? but I cannot get this to work on Mac OS. Any ideas?

+4
source share

Source: https://habr.com/ru/post/1615684/


All Articles