Twitter Unsupported Phone Number
I want to mark up a phone number as callable link in an HTML document. I have read the microformats approach, and I know, that the tel:
scheme would be standard, but is quite literally nowhere implemented.
Click Activate phone. It's a blue button below the text field. Doing so will verify your phone number, thus adding the number to your account. You can use your phone number to recover your Twitter account if you ever lose access to it.
Skype defines, as far as I know, skype:
and callto:
, the latter having gained some popularity. I assume, that other companies have either other schemes or jump on the callto:
train.
What would be a best practice to mark-up a phone number, so that as many people as possible with VoIP software can just click on a link to get a call?
Bonus question: Does anyone know about complications with emergency numbers such as 911 in US or 110 in Germany?
Cheers,
Update: Microsoft NetMeeting takes callto:
schemes under WinXP. This question suggests, that Microsoft Office Communicator will handle tel:
schemes but not callto:
ones. Great, Redmond!
Update 2: Two and a half years later now. It seems to boil down to what you want to do with the number. In mobile context, tel:
is the way to go. Targeting desktops it's up to you, if you think your users are more Skype people (callto:
) or will more likely have something like Google Voice (tel:
) installed. My personal opinion is, when in doubt use tel:
(in line with @Sidnicious' answer).
Update 3: User @rybo111 noted, that Skype in Chrome has meanwhile jumped on the tel:
bandwagon. I cannot verify this, because no machine with both at hand, but if it's true, it means we have finally a winner here:
14 Answers
The tel:
scheme was used in the late 1990s and documented in early 2000 with RFC 2806 (which was obsoleted by the more-thorough RFC 3966 in 2004) and continues to be improved. Supporting tel:
on the iPhone was not an arbitrary decision.
callto:
, while supported by Skype, is not a standard and should be avoided unless specifically targeting Skype users.
Me? I'd just start including properly-formed tel:
URIs on your pages (without sniffing the user agent) and wait for the rest of the world's phones to catch up :) .
Example:
daaawxMy test results:
callto:
- Nokia Browser: nothing happens
- Google Chrome: asks to run skype to call the number
- Firefox: asks to choose a program to call the number
- IE: asks to run skype to call the number
tel:
- Nokia Browser: working
- Google Chrome: nothing happens
- Firefox: 'Firefox doesnt know how to open this url'
- IE: could not find url
The best bet is to start off with tel: which works on all mobiles
Then put in this code, which will only run when on a desktop, and only when a link is clicked.
I'm using http://detectmobilebrowsers.com/ to detect mobile browsers, you can use whatever method you prefer
So basically you cover all your bases.
tel: works on all phones to open the dialer with the number
callto: works on your computer to connect to skype from firefox, chrome
As one would expect, WebKit's support of tel:
extends to the Android mobile browser as well - FYI
I keep this answer for 'historic' purpose but don't recommend it anymore. See @Sidnicious' answer above and my Update 2.
Since it looks like a draw between callto and tel guys, I want to throw in a possible solution in the hope, that your comments will bring me back on the way of light ;-)
Using callto:
, since most desktop clients will handle it:
Then, if the client is an iPhone, replace the links:
Any objections against this solution? Should I preferably start from tel:
?
Mobile Safari (iPhone & iPod Touch) use the tel:
scheme.
Unsupported Phone Number. Twitter
CœurRFC3966 defines the IETF standard URI for telephone numbers, that is the 'tel:' URI. That's the standard. There's no similar standard that specifies 'callto:', that's a particular convention for Skype on platforms where is allows registering a URI handler to support it.
this worked for me:
1.make a standards compliant link:
2.replace it when mobile browser is not detected, for skype:
Selecting link to replace via class seems more efficient.Of course it works only on anchors with .phone
class.
I have put it in function if( !isMobile() ) { ...
so it triggers only when detects desktop browser. But this one is problably obsolete...
I used tel:
for my project.
It worked in Chrome, Firefox, IE9&8, Chrome mobile and the mobile Browser on my Sony Ericsson smartphone.
But callto:
did not work in the mobile Browsers.
I would use tel:
(as recommended). But to have a better fallback/not display error pages I would use something like this (using jquery):
The assumption is, that mobile browsers that have a mobile stamp in the userAgent-string have support for the tel:
protocol. For the rest we replace the link with the callto:
protocol to have a fallback to Skype where available.
To suppress error-pages for the unsupported protocol(s), the link is targeted to a new hidden iframe.
Unfortunately it does not seem to be possible to check, if the url has been loaded successfully in the iframe. It's seems that no error events are fired.
Since callto:
is per default supported by skype (set up in Skype settings), and others do also support it, I would recommend using callto:
rather than skype:
.
Although Apple recommends tel:
in their docs for Mobile Safari, currently (iOS 4.3) it accepts callto:
just the same. So I recommend using callto:
on a generic web site as it works with both Skype and iPhone and I expect it will work on Android phones, too.
Update (June 2013)
This is still a matter of deciding what you want your web page to offer. On my websites I provide both tel:
and callto:
links (the latter labeled as being for Skype) since Desktop browsers on Mac don't do anything with tel:
links while mobile Android doesn't do anything with callto:
links. Even Google Chrome with the Google Talk plugin does not respond to tel:
links. Still, I prefer offering both links on the desktop in case someone has gone to the trouble of getting tel:
links to work on their computer.
If the site design dictated that I only provide one link, I'd use a tel:
link that I would try to change to callto:
on desktop browsers.
Using jQuery, replace all US telephone numbers on the page with the appropriate callto:
or tel:
schemes.
Thanks to @jonas_jonas for the idea. Requires the excellent findAndReplaceDOMText function.
I use the normal <a href='tel:+123456'>12 34 56</a>
markup and make those links non-clickable for desktop users via pointer-events: none;
for browsers that don't support pointer-events (IE < 11), the click can be prevented with JavaScript (example relies on Modernizr and jQuery):
AlexAlexprotected by Mr. AlienMay 30 '13 at 11:12
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Not the answer you're looking for? Browse other questions tagged htmlmarkupurl-schemephone-number or ask your own question.
In an effort to add an extra layer of security to your Twitter account, take a few seconds out of the day and setup two-step verifications on your account. The added layer of security requires you to enter your password, and then a subsequent six-digit access anytime you try to log into Twitter. The short code is sent via text message to your cell phone, which means that any would-be hackers would need to not only crack your password, but to also have physical possession of your cell phone.
With the service enabled, you'll spend a few extra seconds to log into the service, but having a secure account is worth it.
Setting up Twitter's two-factor authentication requires you to use a computer and visit your security settings page. You can also log in to your Twitter account on Twitter.com, navigate to Settings, followed by clicking on the Security & privacy link to the left to the page.
Check the box next to 'Send login verification requests to (my number).' If you don't already have a phone number attached to your account, follow the prompts to add one. With the box checked, a series of prompts letting you know that the service is about to be enabled, and that it requires you to connect your mobile phone number to your Twitter account.
Conversely, you can opt to have Twitter send the verification code to your smartphone via the official Twitter app. But I'd advise to use your phone number instead, as you can easily replace a lost phone and regain access to your phone number. Accessing the app you had installed on a lost device doesn't offer the same convenience.
You'll receive a test text message, verifying that you have the right number added to your account. After indicating that you received the message, you're done setting up two-factor authentication.
The next time you try to log into the website, you'll use the same password you have now, but after entering it you'll be prompted to enter the code sent to your phone.
There will be times when apps and services aren't set up to deal with the added verification step properly, and when that does happen you'll need to have a random password generated to log in with. To get the temporary password, you'll need to visit your account's password settings page and click on the 'Generate' button at the top of the page. Use this temporary password in place of your standard password when logging into the app or service.
This piece was originally published May 22, 2013, and has been updated.
Get Amazon Prime Day deals without being a member: You won’t have to pay a thing -- unless you buy something, of course.
7 best Prime Day shopping tips: Master these to snag the best deals on July 15.