How does Twitter for iPhone bookmarklet work?

会有一股神秘感。 提交于 2019-12-21 21:34:46

问题


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?

来源:https://stackoverflow.com/questions/2919472/how-does-twitter-for-iphone-bookmarklet-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!