Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Loading only 33 pictures max from Instagram when I request 99

In the refresh method located in THPhotosViewController, I inserted the count parameter to increase the number of pictures returned from the Instagram's API.

Here is my code: '''

'''

When I run the app and check the view, the max number of pictures I can see is 33 and not 99.

Interestingly enough, if I plug in a count number lower than 33, it only shows that number.

E.g: count=15&access_token=... returns 15 pictures in my view from Instagram.

Any ideas from the community how I could get this fixed?

Thanks for your patience, I am a beginner. Arsene

2 Answers

Stone Preston
Stone Preston
42,016 Points

hmm well I found this post and it mentions if you want to load ALL of the persons feed you can use -1 as the count variable

NSString *urlString = [[NSString alloc] initWithFormat:@"https://api.instagram.com/v1/users/self/feed?count=-1&access_token=%@", self.accessToken];

Getting there. With the -1 parameter I get to 48 media now instead of 33.

I just tested it. I wish I could get more, it's a good start though.