Tag Archives: Application programming interface

Twitterank and the perceived need for OAuth

In the last few days, there have been a number of stories about Twitterank and the way it asks you for your Twitter username and password in order to calculate something it calls “PageRank for Twitter”.

City Under SkyImage by ecstaticist via Flickr

The issue here, as you might have guessed already, is that the service requires you to enter a password and is in this way essentially a phishing site.

As a solution to this problem, everyone in the debate is calling for an use of OAuth, authentication protocol that doesn’t require one to disclose authentication tokens.

So that’s what we already know and the industry essentially decided on – OAuth is good for breaking walled gardens. Yet there’s another point to this story, that I haven’t seen being presented – there is no real need for any authentication in this service.

Twitter has an excellent API, that allows you to see who a (public profile) person follows without any need for authentication. You can either parse microformats on the page or use their API. It’s even bidirectional as you can see both “friends” and “followers” depending on direction of connection you are interested in.

Oh, an that “viral” tweet, that service allows you to post after you’ve checked your Twitter rank? You can do it with a piece of Javascript.

The big point

So the issue we should be debating about here is how to build more services like Twitter that allow you to access information in computer readable formats using Microformats, RDFa or just RESTful API and not how to authenticate into overly closed gardens.

 

 

Reblog this post [with Zemanta]

Wikimedia Commons for Fun and Profit – Brianna Laugher [Wikimedia 2008 notes]

Wikimedia Commons logoImage via Wikipedia

What is Wikimedia Commons:

 

  • Central resource for Wikimedia
  • Wiki – anyone can edit, be bold, etc.
  • Media – it’s not text, it’s especially images
  • Multilingual – all the languages inside the single wiki
  • Free Content – all the files are availalbe under Free Licenses
  • Community – lots of people who consider this their “wiki home”

 

It’s a rapidly growing project – 3 million+ files!

 

Wikipedia has now single user login, so they’re expecting to increase their database even more.

 

Technical problems

 

Solved:

 

  • Single user login
  • Inline video player
  • Thumbnails in search results
  • Email notifications of talk page changes

 

Wish list for the future:

 

  • Global Whatlinkshere (check-usage) – it’s important to help administrators and keep copyright infringement out
  • Automatic transfer
  • Move/rename images – a move tab. Now you need to use bots to do that.
  • Integrated workflow – like having a way if someone already checked the file
  • Write (upload) via MediaWiki API - 
  • Category display/sorting options
  • Category i18n
  • Batch uploading
  • Upload form customisability
  • Searching template fields as a database
  • Improved Right-To-Left interface display
  • Multilingual interface for non users
  • A/V format conversion on upload
  • Integrated image editing (esp. SVGs)
  • Integrated geo-stuff – as part of MediaWiki, not templates
  • Automatic user upload gallery
  • Category/user feeds
  • File rating systems
  • [.. and a few more .. ☺]

 

Commons API

MediaWiki has an API, but the community builds structure in the wiki (templates, categories).

How can register user reliably determine a file’s license and author.

 

Mangnus – http://commons.wikimedia.org/wiki/User_talk:Magnus_Manske – has create a tool for that: http://toolserver.org/~magnus/commonsapi.php

 

Quality processes

 

  • Featured pictures
  • Quality images
  • Valued images

 

A way to encourage people to contribute and recognize their contribution.

 

Cheerleading, partnerships

 

  • Picture of the day
  • Picture of the year
  • Meet our photographers
  • Meet our illustrators
  • Pearson Scott Foresman – educational publisher donated illustrations (in paper); now they community is tagging and categorizing them and adding other meta-data
  • Wikipedia Takes Manhattan – people took photos of Manthattan, lots of high quality pictures of important buildings and places
  • (PGIP)

 

Policies and guidelines

GFDL (for text)

It’s a central repository

They want high quality images and meta-data

It’s a volunteer project

[and lots of other information that was too fast to present]

 

Major challenges

Usability – too much warnings, quite scary to upload file

Scope/censorship

Project relationships – all the communities need to work together; some local wikipedias are already requiring people to upload to commons directly

Partnerships – it’s hard to make good connections with institutions on volunteer base

 

Wikimedia Commons, readers’ view / Censorship

Top views show pictures related to sexuality. There is currently a proposal in working that require files to be realistically useful. The problem is that the project doesn’t want to be historically short-sighted.

Hot topics: Violence, Nationalism, Religion, Sex!

Zemanta Pixie

Marko Samastur – Easy deployment of site-extensions with a browser plugin [firefox3 launch party notes]


Description unavailable

Image by ccmerino via Flickr

Marko Samastur – Easy deployment of site-extensions with a browser plugin.

Starting with Zemanta presentation, since it’s relevant for the presentation. Zemanta is a tool for contextual matching for blogging platforms and has to support a wide variety of platforms.

The limitations of XHR was a problem because of limitations of security-model that doesn’t allow cross-domain POST requests. In case of Zemanta, we can use custom-build JavaScript function.

When to use extension?

When web-site as such, doesn’t provide integration points (e.g., Blogger.com platform), the other reason is if you want to use functionality that is not available within the normal browser window.

Process

First thing that you need to do, is that you need to find a place for widget. In case of Zemanta, we used right side widget. In this case, we used CSS and made it a bit narrow.

Blog better using Zemanta
Creative Commons License photo credit: chucks

But wherever you go, CSS selectors that you use, will most probably match styles of the platform. So if you use a widget on different platforms.

You can conquer this within CSS by writing selectors that are more binding than the default way. The one that we did (and is not the best way), we use a platfora of id’s and classes and then we use these names and classes that get injected into web-page and are more binding than the platform ones. This one works great if you use two files: general one and platform specific one.

Second way is to use nesting and “id envelops” – encapsulation and while it’s ugly, it’s the best way:

#zem1 #zem2 #zem3 h3 {

}

the second thing that you should try to use is microformats. After you put your widget into the page, you usually want that widget to do something, and for that we normally use Javascript.

Javascript problems

The variety of problems is large, but a short selection:

Extending Object and Array – it sounds a good idea in a start, but it’s a major problem down the road. It’s usually a bad idea that many JavaScript libraries (like JQuery), use Objects as configuration buckets and if you extend it, it means that all objects will have this and bad things will happen.

The second thing is, that if you have a web-site and you want to have it “extendable”, it’s a good idea not to step all over their feet and potential code.

Private name-spaces – either through anonymous functions or through object hierarchy. The problem is that sometimes you want to change behaviour of methods that are hidden behind namespaces (e.g., changing how dragging boxes works in 2.3 WordPress).

One thread implication: what comes later can rely on what came before. It’s not always true, because JavaScript API’s like DOM functions doesn’t always run in the same thread.

While you can do is to test your JavaScript on slow browser and computers, and on different connections. But this is often not enough, so you should actively protect from this and check to make sure the code and functions are there before you call them.

Useful tools for extension creation

Firefox extension Wizard – http://ted.mielczarek.org/code/mozilla/extensionwiz/

FUEL – http://developer.mozilla.org/en/docs/FUEL

Besttoolbars – http://www.besttoolbars.net/

Zemanta Pixie