How to send a link in an SMS so that the preview is loaded automatically? - ios

I am using twilio to send SMS messages to phone numbers. What I am having problems with is making sure that once a user gets the message the preview of what is at a certain link actually loads in the message the user sees on the phone.
What is the proper way to send a link that automatically shows the preview?
EDIT:
I tried the open graph api. Apple does have a tech note on that. But, then, why does this link provided a proper preview in messages when I send this link to another phone? It works, and it does not use open graph.
https://i1.wp.com/www.asphaltandrubber.com/wp-content/uploads/2017/11/2018-Ducati-Panigale-V4-29.jpg?ssl=1

a couple of things you can try
have the link at start of the message or end of the message
the link should be properly formatted with either http:// or https://
iOS uses The Open Graph protocol to support what image to show in the link . http://ogp.me/

Related

Long URL isn't fully blue when embedded inside SMS text message

In our app, we use MFMailComposeViewController in order to generate and send an invitation message, containing some text and a deep link. Sometimes, when there is a network communication problem, the deep link can't be shortened. When this happens, after the recipient gets the invitation message, the link is broken:
I have no idea why it happens. Is there any way to fix this? By the way, if the recipient uses an Android device, the link is displayed correctly.

open URL inside presented MFMessageComposeViewController

I have an app that presents a MFMessageComposeViewController for sending a text message for a predefined number. The current user already has an SMS history with this number, so already existing SMS with this number show up in the composer. Some of this SMSs have links inside.
Problem is:
When I click on the link from my app message composer the link does nothing.
BUT when I open the SMS app, select the contact and click the links in old messages it opens in Safari.
Question is: is there any way I can handle the tap on the links inside an MFMessageComposeViewController?
From what I can tell this is not currently possible.
And you are also not aloud subclass. Since there are no other public messaging Apis you are out of luck on this one. - at least on this version of ios 7.

How to read a SMS in iOS and is it able to pass an string to the application via link in the SMS

do anybody know about how to read a SMS in iOS with Xamarin iOS ? and then I want to pass a string from that SMS to the application via link. For example when user click the link in the SMS it will pass a string value to the application and in the application a method is waiting to trigger that.
It's impossible to read incoming or storing SMS's due to iOS security restriction.
Although you can't directly intercept SMS messages, you can create a custom URL scheme so that if a user clicks a link in your message it will launch your app.
If Jason's answer of using a link to the app, there is an alternative. In my case a web service is sending down a code (two stage auth). When I know its going to be coming, I prompt the user to looks for it, and when it comes long press the message bubble, and copy the whole message to the pasteboard.
When the user switches back to my app, I've set a flag to look at the pasteboard, I see the message, extract out the code, and if it "works" the user can continue without further interruption.
Not as elegant as Jason's answer, but if you cannot control the sms content, its an option.
It is possible from iOS 12
textField.textContentType = .oneTimeCode
Please check this doc

How to send a hyperlink to a mobile via SMS or MMS

I have been looking for a way to send a hyperlink of a URL with a different appearance to a mobile phone via SMS or MMS.
The only example of this that i can think of is the following:
[url=http://www.google.co.uk]Click Here[/url]
So the above code will show:
Click Here
when you click the 'Click Here' link it will open up http://www.google.co.uk.
Is there anyway that this can be replicated by using SMS or MMS?
As far as I know, there is not a generally accepted specification for rendering text messages with modern content. Though certain mobile operating systems (or rather messaging applications to be precise) might support inline links, it is not fail-proof and it won't work on every device.
Also, those smart-ish applications would not rely on a custom syntax but rather search for urls and make those clickable. That means it's not possible to set a custom text for a hyperlink in this context.
You can´t include hiperlinks in text messages, although most mobile browsers allow click in links. Also You could send a wap push (it´s a special binary sms) that it includes one link.

Is there a way to force an email received by a blackberry to open directly in a certain URL?

Let me explain:
There are some apps (like the Facebook app) that send emails to the BB device, but when I open the said email, it opens directly in my facebook app. How is that possible? Is there an API or something I need to know about to be able to program that on my own app?
On another topic, could I do the same thing, but simply force the email to open a certain url in the BB browser?
Hope I explained myself.
Cheers!
Short answer, yes.
Take a look at the Message List Demo Sample application and the net.rim.blackberry.api.messagelist.* apis. That will handle the "injecting my own stuff into the message list" component of what Facebook does.
Secondly as for "grabbing incoming emails and doing things with them" you need to use FolderListener from net.rim.blackberry.api.mail.* APIs

Resources