Skip to content

Instantly share code, notes, and snippets.

@samsymons
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samsymons/9176188 to your computer and use it in GitHub Desktop.
Save samsymons/9176188 to your computer and use it in GitHub Desktop.
Commenting with RedditKit
require 'redditkit'
client = RedditKit::Client.new 'username', 'password'
item_to_comment_on = 't3_1o72gp' # You can use a RedditKit::Link or RedditKit::Comment in place of the full name here.
client.submit_comment item_to_comment_on, 'Hello world!'
@audy
Copy link

audy commented Feb 24, 2014

Still confused. What does the string in item_to_comment_on correspond to?

Say I want to comment on http://www.reddit.com/r/funny/comments/1yrm26/this_seems_fitting_for_today_hahah/. There is an ID in the URL 1yrm26. Is that what I use to Item?

I also don't see a way to create a RedditKit::Link as it has no initialize.

Thanks,
Austin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment