Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.