How does Twitter for iPhone bookmarklet work?
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 "twee开发者_JAVA技巧tie: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?
精彩评论