Create an ‘iMessage Me’ link

With the launch of iMessage on the Mac earlier this month, we now have what I think to be the perfect IM solution – cross device (not platform, sadly) syncing of message histories – why couldn’t anyone do this earlier?

You may like to add an iMessage Me link to your website/blog to make it easier for people visiting your page from a Mac or iOS device (iPhone, iPad, iPod touch) – just a tap and they’re all set to iMessage you.

For whatever reason, iOS and OS X use different URL schemes for iMessage – I understand why Messages for Mac may not want to adopt the sms: scheme, but I find it odd that iOS doesn’t like the imessage: scheme. So we’re left with two different schemes depending on the platform your visitor is using.

Using some fancy PHP trickery, here’s some code that will detect your visitor’s operating system, and based on that display either a sms: link or an imessage: one.

Throw this inbetween your standard link and you’re good to go.

For example:

Or, put together:

And in action:
iMessage me!

Tapping/clicking on this will bring up the Messages app on either platform with your email address pre-filled. Nifty.

And if you’re not on an iPhone with iOS 5 installed, or some other handset, this should bring up an MMS window with your email address pre-filled too.

9 Comments

  1. […] website where you can just tap on your iOS device or click on your Mac to send me a message. (visit here if you’d like to add an iMessage link to your website/blog)Beau Giles contributed to this […]

  2. Vic
    June 16, 2012

    have you thought about making a full html code for this, php for some reason won’t work with a dropbox public site. could you possibly write a code for me that does
    <a href=":youremail@email.com”>

    • Beau Giles
      July 17, 2012

      Hey Vic;
      Unfortunately PHP is used here to detect whether the user is on a Mac or iOS device, and then change the URL to suit.

      You can use a href=sms:email@email.com or a href=imessage:email@email.com but remember that the SMS link only works on iOS, and the iMessage link only works on the Mac; it’ll throw up an error on iOS.

    • August 24, 2012

      Have you tried renaming your .html file to .php? That worked for me on my own site.

      Thanks for the solution, Giles. 🙂

      • Beau Giles
        August 25, 2012

        Hey Gabriel.
        That’ll work if your host supports PHP – sadly Dropbox doesn’t.

  3. Nic
    August 26, 2012

    Is it possible that it activate a message and send to us?

    E.g. When a user directly click on the link, it will send us notification automatic on clicking and we can start the conversation. Probably with a custom message. Possible?

Comments are closed.