-1

There's a feature on smartphones where you can send someone a "pin" of where you're at or another location. This can be on Google Maps, Apple Maps, etc..

On the messaging side..this shows up as a 'preview' of the pin that's clickable and will then launch the respective maps app.

How can I send said "pin" through Twilio?

I noticed the format of these pin urls looks like https://maps.app.goo.gl/9s8sdsiuGPitgT6?g_st=ic

Note the maps.app part. I thought this is what would make the preview work.

I tried that with Twilio and it just results in sending over a hyperlink. (Opening up the hyperlink does usually open up the respective app on the phone. That's fine..but I'm really tryna get the preview to show up too)

Is this even possible with Twilio? Is this something I'd need to use the MMS API for?

Note: I'm using a Twilio Serverless function with JS to achieve this.

Thanks!

user2402616
  • 1,434
  • 4
  • 22
  • 38

1 Answers1

1

I have an app built on Twilio and send URLs frequently. To my understanding - the link preview feature is dependent on the device receiving the message. Here is an overview from Twilio that explains how link previews work.

As an alternative - you might check out what3words as an option for sending location info. We needed to send very specific meeting locations to people and this helped. Sending a general address was never specific enough - and this let you save a very specific location and share it with others.

Hope this helps!

Brent
  • 34
  • 3
  • Thanks! `iOS will only render a preview for links sent in SMS or MMS if the sender is saved in the recipient's contact list` answered this for me. Saving Twilio number in my iPhone does now make it so that 'preview' comes up. Happen to know how to do this for Android? Also, I'm not really understanding w3w yet. Seems like it's just a way to send descriptive locations..which is cool, but how can it solve the 'preview' issue? Reason I want the preview is just so user can see actual map in text thread and be able to click on it to open respective Map app – user2402616 Jan 13 '23 at 18:59
  • 1
    @user2402616 - correct about w3w - it's just another way to send locations but doesn't help with link preview. I have an Android and link previews generally show up - even from unsaved contacts. If you're not seeing the preview, a couple of things you can try are making sure to use http:// or https:// in the URL. Also, place the URL at the beginning or end of the message (don't surround it with custom text). Lastly, if your message is getting too long - consider using a [Link Shortener](https://www.twilio.com/docs/messaging/how-to-configure-link-shortening). – Brent Jan 13 '23 at 20:20
  • Thanks for clarification. Sounds good, I'll test with an Android later. – user2402616 Jan 13 '23 at 20:43