Tweet Directly From Opera’s Address Bar
Dustin Wilson, also known as Khadgar in the MyOpera community has been able to tweet by configuring Opera.
First you have to configure it by adding the data URI:
data:text/html,%3C%21DOCTYPE%20html%3E%3Chtml%20lang%3D%22en%22%3E%3Chead%3E%3Cmeta%20charset%3D%22UTF-8%22%3E%3Ctitle%3ETweet%3C%2Ftitle%3E%3Cstyle%20type%3D%22text%2Fcss%22%3Eobject%7Bvisibility%3Ahidden%3B%7D%3C%2Fstyle%3E%3C%2Fhead%3E%3Cbody%3E%3Cscript%20type%3D%22text%2Fjavascript%22%3Efunction%20enc%28text%29%7Breturn%20encodeURI%28text%29.replace%28%2F%5C%2B%2Fg%2C%27%2520%27%29%3B%7D%20var%20tweet%3Denc%28%27%s%27%29%3Bvar%20username%3Denc%28%27ook%27%29%3Bvar%20password%3Denc%28%27eek%27%29%3Bdocument.write%28%27%3Cobject%20data%3D%22data%3Atext%2Fhtml%2C%253C%2521DOCTYPE%2520html%253E%253Chtml%2520lang%253D%2522en%2522%253E%253Chead%253E%253Cmeta%2520charset%253D%2522UTF-8%2522%253E%253Ctitle%253ETweet%2521%2520Tweet%2521%253C%252Ftitle%253E%253C%252Fhead%253E%253Cbody%253E%253Cform%2520method%253D%2522POST%2522%2520action%253D%2522http%253A%252F%252F%27%2Busername%2B%27%253A%27%2Bpassword%2B%27%2540twitter.com%252Fstatuses%252Fupdate.xml%2522%2520name%253D%2522tweet%2522%253E%253Ctextarea%2520name%253D%2522status%2522%253E%27%2Btweet%2B%27%253C%252Ftextarea%253E%253Cinput%2520type%253D%2522submit%2522%253E%253C%252Fform%253E%253Cscript%2520type%253D%2522text%252Fjavascript%2522%253Edocument.tweet.submit%2528%2529%253B%253C%252Fscript%253E%253C%252Fbody%253E%253C%252Fhtml%253E%22%3E%3C%2Fobject%3E%27%29%3B%20window.location%3D%27http%3A%2F%2Ftwitter.com%2F%27%2Busername%3B%3C
To use it follow these directions:
1. Copy the long data URI into a text editor and do a text replacement for “opera” then replace it with your twitter username.
2. Do a text replacement for “software” and replace it with your password.
3. Go to Tools → Preferences (or Opera → Preferences on Mac OS X).
4. Click on the Search tab then click the Add… button.
5. In the input box labeled Name type in Twitter.
6. Type in a suitable keyword in the Keyword field. For example tw.
7. Paste in the data URI from your text editor into the Address field and click OK.
Now you should be able to type tw Hello world! and update your status on Twitter with “Hello World!”. As this is just a proof-of-concept it can be expanded to do more such as display an error if you’ve typed in more than 140 characters among other things with javascript.
To make it work, you have to login normally to twitter and you are ready to go.
Via: my.opera.com
[digg-reddit-me]
Comments (5)
Trackback URL | Comments RSS Feed
Sites That Link to this Post
- Browsers Tracker, No Ads, More Writers and More | January 8, 2009
1) there is no “opera” or “software” in the code.
2)there is a “username” and “password” but if you replace them it does not work.
And this :)
http://my.opera.com/edvakf/blog/2008/07/24/update-twitter-status-from-opera-address-bar
I remember testing Dusin’s method a while ago, it had a drawback of multibyte-character garbling. (don’t know if it was fixed already)
What’s with this overuse of var declarations and the uri encoding of already uri encoded html?
var username = enc(‘ook’)
var password = enc(‘eek’)
You should replace ook with your username and eek with your password.
Thank you for linking to my post. Surprising how quickly this has spread around. Thanks to some stuff edvakf pointed out to me in the My Opera post he linked to in his comment here I decided to have another go at it. My post contains a link to an updated version. I keep the old one around for the hell of it.
http://dustinwilson.com/articles/2008/09/25/Tweet_from_Operas_Address_Bar_2/
This one works better than the previous one. Same with this one replace ook with your username and eek with your password. It should work better. I’m unsure about multibyte encoding problems with this version however. Considering it’s not having to be urlencoded it should be okay at least with my personal tests.
Again thanks linking to my post.