-
Notifications
You must be signed in to change notification settings - Fork 30
CommentsList
Posting a reply:
• (user from cookie)
• modhash the normal way
• “thing_id” of parent
• “text” of comment
Have to
Posting a reply:
(to thread)
POSTDATA=thing_id=t3_8yvu7&text=funk&id=%23form-t3_8yvu7p6f&r=test&uh=81301qp08z306f084f00c68d930888bb02f7b4dd16d2cf01c2
(to another comment)
POSTDATA=thing_id=t1_c0byza3&text=replyzo&id=%23commentreply_t1_c0byza3&r=test&uh=81301qp08z306f084f00c68d930888bb02f7b4dd16d2cf01c2
What is “id”?
In the response from the HTTP POST, it will return a lot of escaped HTML inside the JSON.
Starting from somewhere after character 800 of response, Look for:
[30, 31, “call”, [[{"kind": “t1”, “data”: {"parent": “t1_c0bzgtd”, “content”: “<div class=\” thing id-t1_c0bzh6p even odd comment\" ><p class=\“parent\”><a name=\“c0bzh6p\” ></a></p><div class=\“midcol likes\” ><div class=\“arrow upmod\” onclick=\“$(this).vote(‘af038ac1ad5867fcd87c9c99086370a0a0b73830’)\” … onsubmit=\“return post_form(this, ‘editusertext’)\”\n \n id=\“form-t1_c0bzh6pw8z\”>
OR, towards the end (in this case within the last 300 characters):
“contentText”: “re”, “link”: “t3_8yvu7”, “replies”: "", “contentHTML”: “<div class=\”md\“><p>re</p></div>”, “id”: "t1_c0bzh6p"}}], false]], [0, 32, “call”, [“#noresults”]], [32, 33, “attr”, “hide”], [33, 34, “call”, []]]}
edit comment:
www.reddit.com/api/editusertext
POSTDATA=thing_id=t1_c0ci6tc&text=reply+to+thatz&id=%23form-t1_c0ci6tcoo5&r=test&uh=p6pkb8crh589ea90d4e4c797f3ead08eac4cff98a772dc59c7
edit OP selftext:
POSTDATA=thing_id=t3_9cz6s&text=byebye%0Aseeya+1&id=%23form-t3_9cz6s0el&r=test&uh=f7jb1yjwfqd4ffed8356eb63fcfbeeadad142f57c56e9cbd9e
So, same as reply.
delete:
www.reddit.com/api/del
POSTDATA=id=t1_c0cxa7l&executed=deleted&r=test&uh=f7jb1yjwfqd4ffed8356eb63fcfbeeadad142f57c56e9cbd9e