Bookmarklet for Twitterrific on the iPhone
Yesterday I saw a tweet from John Gruber about an iPhone bookmarklet that would let you post the current url you are viewing in your iPhone’s Safari browser to Twitter using Tweetie.
Here is the final destination of his tweet.
This sounded like a cool trick that I would like to use with Twitterrific. (I am too cheap to pay for Tweetie and Twitterrific is free. I love me some free apps.) I decided to try and duplicate the trick to work with Twitterific. After a few different variations of the javascript command, I was able to get it working. I liked the idea so much I thought I would share it.
The first step is to open your iPhone’s browser and enter "About:blank" as the URL you want to navigate to.
Next, tap the "+" at the bottom of the screen to bring up the "Add Bookmark" popup.
Click "Add Bookmark" and then enter in "Post to Twitter" or what ever else you want the bookmarklet to be called.
The next step in the process will be done on your computer. This will require you to have your bookmarks synced with Safari. Once the bookmark shows up in your Safari bookmark list you will be able to complete the last step.
To complete this step, all you need to do is change the address from "About:blank" to
javascript:window.location=’twitterrific:///post?message=’+escape(window.location)
If you like, you can create a bookmark folder for your iPhone to keep your iPhone bookmarklets seperate from your desktop bookmarks. This bookmark will not work on your computer. It will only work on the iPhone. Once the bookmark syncs back to your iPhone you are ready to go.
Now you can share webpages directly from your Safari browser on your iPhone with Twitter via Twitterrific. All you need to do is navigate to the page you would like to share and pull up your bookmarks and select "Post to Twitter" or whatever you decided to name the bookmarklet. Safari will close and Twitterrific will open with the url of the web page in the dialoge box ready for you to post to Twitter. If the length of the url is over a certain amount, Twitterrific will automatically generate a tinyurl for the link.
Enjoy.
Powered by Qumana













