...or; How-to update Twitter from Opera's address bar

Always looking to save a second or two on repetitive tasks, I figured I'd check if Opera's magnificent keyword search feature could be used to post status updates to Twitter. Utilizing Twitters powerful API, I had this working within minutes...

First of all let me say that this in no way is intended to replace Twitters web-interface or third party solutions such as Twhirl or the Opera Twitter widget. Its not a pretty solution. There's no bells and no whistles, you even have to count the characters yourself. It is however a simple hack to quickly get your updates onto Twitters servers, without requiring anything but a web-browser (and obviously a connection to the internet).

As mentioned above I wanted to use Opera's keyword search feature (a feature that converts forms into keyword shortcuts made available from the address bar). Initially I'd planned on using it with Twitters general status update form, though it quickly became1 apparent that this form simply is a "placeholder form" and that any actions are performed exclusively through JS. Given that door #1 was slammed shut, I quickly moved on to door #2; The Twitters API. A quick look at the documentation and it seemed to have everything I needed (which given that I only want to post a message, really isn't that much). A quick test confirmed that posting to the API worked as intended...

Screenshot of a message at TwitterHere's how I've set it up...

Opera's add/edit dialog for keyword searches.

The fastest way to get to this dialog, is simply to right-click in a form field and select Create search from the context menu. You may enter anything you like as the name (displayed in menus etc) and keyword (what you type in the address bar) for your new "keyword search", the other values should be entered as they appear on this page.

Twitter [post update] (core properties)
Name
Twitter [post update]
Keyword
tp
Address
http://twitter.com/statuses/update.xml
Query
status=%s&source=Opera
Use POST
Checked (activated)

To view or edit keyword searches you already have defined, select Preferences from the Tools menu and click the Search pane.

Please note that there's one required option that isn't exposed in the dialog; Character encoding. Twitter requires that all posted values are UTF-8 encoded. An easy method to ensure that the correct character encoding is used, is to initiate this from Twitters status update form, that way you'll inherit the encoding defined by Twitter. The more hands on approach is to manually edit Opera's search.ini.

At least for now, updates posted from Opera's address bar will appear as "from web" once on Twitter. While information about the source is available to Twitter in the query (notice the source=Opera), whats done with this information is up to the Twitter developers. I have however submitted a request to have Opera credited as the source application.

Footnotes
  1. While digging around Twitter to get this to work, I stumbled upon a minor glitch. When using Twitter with JS disabled (trying to figure out where to post what values); the "Status update" form is posted to Update's profile (instead of being posted to a page that processes the form). This should probably be re-routed to something more useful, or at least to somewhere less wrong featuring a relevant error message. (locate)

feedback

  1. Re: Twittering from Opera

    • Lovely post! Thanks :)

      I was able to create a search in the normal way: by right-clicking in the update field and selecting create search. I added "&source=Opera" to the query string, and all is sweet - see twitter.com/thoughtjourney.

    • Details:
      • Posted by
      • Mandy
      • on the 14th of November 2008 at 16:39
  2. Re: Twittering from Opera

    • Hmmm, seems I was mistaken. It worked for a day, after which I received a 403 Forbidden error. Using your suggestion works nicely, thanks :)

    • Details:
      • Posted by
      • Mandy
      • on the 16th of November 2008 at 11:51
  3. Re: Twittering from Opera

    • Hi Mandy and thanks for your comments. Nice to learn that my solution/workaround helped someone. :-)

      Don't remember if it was this way earlier, but if you examine the querystring in Twitters form you'll find an "authenticity_token" parameter. This likely is part of their method for authenticating form submissions, furthermore the value for the token is likely time-limited. I'm guessing your normal keyword search worked as long as the token was valid...

    • Details:
      • Posted by
      • evirtus
      • on the 16th of November 2008 at 15:33
  4. Re: Twittering from Opera

    • thanks... really nice way.

    • Details:
      • Posted by
      • ZorphDark
      • on the 11th of July 2009 at 04:56
  5. Re: Twittering from Opera

    • I found a cool way of doing things in the sidebar (panel in opera's case) is re-purposing Iphone webapps to become sidebars. Hahlo 4 works fine in opera, (afaik) so you can also turn it into an effective twitter panel, though the colors may not match your theme, functionality pretty much trumps design, since the design is a nice black/white anyway.

    • Details:
      • Posted by
      • atomic1fire
      • on the 19th of September 2009 at 23:36
  6. Twittering from Firefox & Chrome

    • You can do this in Firefox and Chrome as well, I've written up a guide:
      http://www.slozowick.com/2010/01/how-to-post-to-twitter-and-facebook-from-the-google-chrome-and-firefox-address-bar-without-a-plugin-13/

    • Details:
      • Posted by
      • Surat
      • on the 10th of January 2010 at 03:53
Add your comment
Info

In addition to the comment itself, a name (preferably your real one) and either your email address or website is required. Line-breaks will be identified and encoded, html will simply be encoded as text.

Please read the blog commenting policy, you'll have to accept it before posting. Any information you decide to share will be treated with the respect it deserves, as such your email address etc will not be shared voluntarily with any third party.

 
Contact details
 
Comment
 
Control
 

Couldn't generate page, however a cached copy was found and served on the 1st of January 1970 @ 00:00 in 0.000 seconds...

Errors occurred while generating this page... (More info availible)