-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submission.getComments() always returns null #29
Comments
Can you include the code that is producing this error? |
I already deleted everything I had wrote before so here's something I just quickly threw together.
Output:
|
Reddit doesn't include comments in responses to general pagination, like through a subreddit. Only when that submission is queried directly does Reddit give you that post's comments. An example: public static void main(String[] args) throws NetworkException {
RedditClient reddit = new RedditClient("USER-AGENT");
SubredditPaginator subreddit = Paginators.subreddit(reddit, "funny");
for (Submission s : subreddit.next()) {
Submission fullSubmissionData = reddit.getSubmission(s.getId());
System.out.println(fullSubmissionData.getTitle());
System.out.println(fullSubmissionData.getComments());
}
} |
Oh, that makes sense. Thanks, sorry for the bother. |
This was referenced May 1, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Even when I know that the submission has comments and getCommentCount() tells me the right amount of comments, getComments() always returns null.
The text was updated successfully, but these errors were encountered: