An Objective-C block-based, ARC, API wrapper for the complete Instagram API for iOS
Clone the project, and don't forget to clone the submodules and init them
git clone git://github.com/NextRoot/NRGramKit.git NRGramKit cd NRGramKit git submodule init git submodule update
Create an application at http://intagr.am/developer and replace your application key and application secret in NRGramKit-Prefix.pch
Use the provided class methods to make instagram calls and receive the data using the provided blocks, asynchronously.
Authentication:
Just provide NRGramKit with a webview that you display where you want and when you want so it can handle the login process. NRGramKit remembers everything it needs after the process is finished.
[NRGramKit loginInWebView:self.webView loginLoadingCallback:^(BOOL loading){ //you can show a spinner while the webview is loading } finishedCallback:^(IGUser* user,NSString* error) { // yay - you are now authenticated, NRGramKit remembers the credentials }];
You can check if you're authenticated using
[NGGramKit isLoggedIn];
Or get info about the current user using
[NGGramKit loggedInUser];
Unauthenticated calls:
All the calls to the service are done asynchronously and are block-based
[NRGramKit getMediaPopularWithCallback:^(NSArray* popularMedia,IGPagination* pagination) { self.media = popularMedia; }];
Authenticated calls
Authenticated calls will simply fail if you don't login first
[NRGramKit getMediaInUserLikedCount:25 withCallback:^(NSArray* likedFeed, IGPagination* pagination) { self.media = likedFeed; callback(YES); }];