Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How do I make a submission link to HN?
1 point by apotheon on Oct 2, 2010 | hide | past | favorite | 3 comments
I'm sure you've seen it: a "share this" link of some sort on some Website that leads to a submission page at a social news site like reddit or digg. Often, these things include indications of how many upvotes or downvotes a page has received.

What I'd really like is a link like this that actually indicates whether it has already been submitted -- and, if so, how many comments have been made for that submission -- at Hacker News. Failing that, just a simple "submit this" that does the same thing as my browser bookmarklet would do well enough.

I'm not quite familiar enough with JavaScript to have figured this out on my own and, frankly, I'd rather do it without client side scripting if I can, but any help would be appreciated. I feel like I'm missing something obvious.



A link to http://news.ycombinator.com/submitlink?u=[URL OF PAGE HERE]&t=[TITLE OF PAGE HERE] will send the user to the submitting link page, so they can just click on the submit button there. That's what the bookmarklet does. If a post has already been submitted, a resubmit counts as an upvote. Getting the comment count/number of upvotes it harder, as to my knowladge HN doesn't have an API for that.


Hm. I tried that -- but I guess I must have screwed it up somehow when I tried it, because it didn't work. Thanks for confirming I had the right idea the first time. I'll try it again.

I frankly don't much care whether I can get the number of upvotes for display at my site, just to be clear. It'd be nice to get the number of comments (or the fact there aren't any, or that there's no submission at all), though. Maybe I should request a feature for that purpose.


It turns out it worked when I did it this time. I must have had an elusive typo in my previous attempt. Thanks again.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: