You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.
I am trying to figure out how to post a comment to a reddit post I just made.
So far I have tried saving the object that is returned when I do a submit and doing:
RedditKit.submit_comment(submit_object, "test") -- which errors with permission denied
I have tried making a link that I could put in the submit_comment but that just keeps returning nil even though within the same session I was able to make the post originally.
test_link = RedditKit.link("http://www.reddit.com/r/redditbotplaygroundsw/comments/2poh23/test_title/")
Not sure what else to try. The ruby doc says that it will return nil if I am not currently signed in but I am:
That's because you're not using the fullname of the link.
The fullname of a link is the 'kind' of t3 and then an underscore followed by the link id. (You can see here for more: https://www.reddit.com/dev/api#fullnames)
E.G. For your link it would be:
t3_2poh23
So, you would do:
RedditKit.link("t3_2poh23")
Hope that helps!
Hasnain
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to figure out how to post a comment to a reddit post I just made.
So far I have tried saving the object that is returned when I do a submit and doing:
RedditKit.submit_comment(submit_object, "test") -- which errors with permission denied
I have tried making a link that I could put in the submit_comment but that just keeps returning nil even though within the same session I was able to make the post originally.
test_link = RedditKit.link("http://www.reddit.com/r/redditbotplaygroundsw/comments/2poh23/test_title/")
Not sure what else to try. The ruby doc says that it will return nil if I am not currently signed in but I am:
2.1.2 :021 > RedditKit.sign_in 'OMIT', "OMIT"
=> "OMIT"
2.1.2 :022 > test_link = RedditKit.link("http://www.reddit.com/r/redditbotplaygroundsw/comments/2poh23/test_title/")
=> nil
This is a private reddit I have for getting my bot working. I am the moderator and I can without issue make posts. I just can't comment.
The text was updated successfully, but these errors were encountered: