Instead of a Like button, I would much more prefer a link back to the comments section. That is more in line with my use of Hackers News; read article => read comments.
Cool button. However, and I am a fairly new member of HN, I think the beauty of HN is partly in the old-school interface and the lack of a 'like' button. Manually copy-pasting a link actually enforces some level of commitment on your part. Having a one-click button would drive too much less interesting content.
That said, it would be nice if this button scouted HN for the page URL and simply notified users that a discussion with X comments was taking place here.
This solution would reduce the amount of gaming that one could do to vote a post up, but would let dedicated readers know where to look. Thoughts?
Hacker News needs you to be logged in to your account for upvoting and does not provide a programmatic way to do that on your behalf. I remembered from earlier experiences that a resubmission (once per user) counted as an upvote.
Yeesh. I know this is Hacker News and we all appreciate a good hack, but what are the chances of having a real api for this type of thing? For instance, is there a way to programmatically get the list of all articles I've ever upvoted (the "Saved" page)? Or to put "You like this" alongside the HN like button if you've already upvoted it?
Sure, scraping works for operations that don't require login. But we're seeing more and more "apps for HN," and it would be nice if they could authenticate and do nifty things without me giving up my HN password.
Scraping works for operations that require login as well. You just have to start with the login process and hold onto the cookie it gives you after you post to the login form. As long as you continue to send your cookie along with each request you'll be able to access any information you want, as well as automate things like voting (not recommended). I haven't seen anything that asks for my HN password yet. Usually they just ask you to create a separate account with them and will scrape your profile looking for an authentication string to verify your HN account. What apps are you referring to?
Edit: Nevermind, you're referring to scraping only working in scenarios where you're the one doing the scraping -- not some external service. In that case, an API would be useful. I'm not sure about the usefulness of the apps though...
Please not another like button. I long for a time when there wasn't 6 or 7 like buttons for different websites on every blog article screaming "Pick me! Pick me!" and causing visual clutter.
At a former company I worked at our CTO likened our product which had many warts to a machine with many levers. He then went on to compare our customers to monkeys that we had trained to pull the levers in the right order. Pull them in the wrong order and you get an electric shock or something.
Every time I see a cluster of like buttons on a web page I think of monkeys and levers.
This functionality could totally be implemented on the server end. When you submit a link it could tell you that the story was already submitted and when.
Wishing the like buttons would just go out of fashion...
Very interesting idea, and I like the hacking nature of the solution. I was about to ask if it was using my current HN cookie to create that popup but I see now that it is...you basically are reframing the HN pages to fit into that popup, and if the user isn't yet logged in, it shows the HN login page, if you're already logged in then it's taking you to the submit a post page...very cool hack.
Someone else had mentioned that it would be an issue trying to do this by scraping, but this could just as easily be done this way. The downside of course (like someone else had mentioned) is that HN users would need to enter in their username/password to perform the scrape to count current post points and the scrape to upvote posts, and if they didn't see ycombinator.com in the URL they would be skeptical in providing these details because an unscrupulous hacker could then use those logins (if they stored them) to upvote all of their own posts. If others are interested in the scrape version of this hack I could make it ...The upside to the scrape hack version would be the fact that the UI could be adjusted as needed, but like others mentioned HN isn't know for it's elegant UI to begin with...it's more about simplicity
What is that site exactly that prompts me for my HN username and password when I click on Like? Needless to say, I will not be doing what it asks for unless the site is news.ycombinator.com itself... but then the real HN should already know that I am logged in. So, sorry, it's a no go.
Note the lovely domain names sprinkled all over the popup, none related to yc.com. The iframe indeed points at news.ycombinator.com, and I have a HN cookie, so I have no idea why it shows the login form.
Not sure why it isn't working for you. Mine works and I never had to enter my password in the popup. I do have chrome automatically redirect http://news.ycombinator.com to https://news.ycombinator.com so that might be doing it.
This is not CSRF. It uses an iframe containing a pre-filled hacker news submission form effectively causing the user to upvote the already existing story.
It could be argued that hacker news should implement frame busting for additional security, but I don't think it is a huge concern for this site.