This is the server behind the likes feature on Scripting News.
The demo app
Ask questions. I want to nail this down as quickly as possible, so the sooner you spot problems the sooner they can be addressed.
The Hello World app
We use Twitter for identity. We don't read anything from the user's Twitter account, or post anything to it, we use it to know who's doing the liking.
The server uses a SQL database to keep track of likes. Each like consists of three pieces of data, a URL, a screenname and a timestamp. If a user has liked a specific item there's a record in the database. If you unlike it, the record is removed.
The URLs are up to the application. In the demo app, we construct the URL for each item based on the URL of the page followed by # followed by the name of a color.
You are welcome to use my likes server. The client software defaults to using that server, but you can override it.
If you want to run your own server, you have to create an app with Twitter. This used to be open to everyone, but they're making it harder. It's understandable, they have to try to get troll farms under control. But it seems this is a legitimate use of Twitter identity.
What does a Like mean?
It's a way to tell the author that you saw what they wrote and found it likeable. It doesn't mean you necessarily agree. You're also registering your presence to other people who read the blog. It's a way to say hi to the author and others who read the blog. (From a post on Scripting News.)
API for the Node app
There are four calls, /toggle, /likes, /mylikes and /toplikes that provide the backend services your app needs.
/toggle takes three params, and oauthToken, oauthSecret and the URL of the thing that you are either liking or unliking.
/likes takes a URL and returns a list of users who have liked it. It doesn't require oAuth access info.
/mylikes takes two params, and oauthToken, oauthSecret and returns an array of URLs the user has liked.
/toplikes takes no params, and returns an array of most-liked items, in descending order.
Look in the body of handleHttpRequest in likes.js for all the calls it responds to.