How does Twitter for iPhone bookmarklet work?
Posted
by Igor Zevaka
on Stack Overflow
See other posts from Stack Overflow
or by Igor Zevaka
Published on 2010-05-27T08:15:49Z
Indexed on
2010/05/27
8:21 UTC
Read the original article
Hit count: 285
Twitter client (formerly Tweetie) allows you to define a bookmarklet in Safari that launches the app. I want to know which iPhone API allows you to register the protocol specifier (or whatever it's called) - in this case "tweetie:" - in order for this bookmarklet to work.
The instructions can be found here and the bookmarklet itself is below.
javascript:window.location='tweetie:'+window.location
Clicking the above bookmark is the same as typing in "tweetie:http://google.com" into the address bar. This is obviously supported on the OS/Browser level, much the same as tel:
URIs. Am I correct in understanding that developers can add arbitrary URI protocol specifiers as a part of app installation?
© Stack Overflow or respective owner