Giter Site home page Giter Site logo

Comments (6)

ddaddy avatar ddaddy commented on May 12, 2024

Ok, i've found the problem.
This define #define kNextMaxId @"next_max_id" needs to be changed to this #define kNextMaxId @"next_max_like_id"

I'm not sure if that will break anything else though.

from instagramkit.

ddaddy avatar ddaddy commented on May 12, 2024

I've found another similar too. Where pagination is empty but not nil.
Changing if (self && IKNotNull(info)) { to if (self && IKNotNull(info) && [info count] > 0) { seems to fix it.

from instagramkit.

ddaddy avatar ddaddy commented on May 12, 2024

This does break other functions. So try this instead:

- (id)initWithInfo:(NSDictionary *)info
{
    self = [super init];
    if (self && IKNotNull(info) && [info count] > 0) {
        NSLog(@"%@", info);
        _nextURL = [[NSURL alloc] initWithString:info[kNextURL]];
        if (IKNotNull(info[kNextMaxId]))
            _nextMaxId = [[NSString alloc] initWithString:info[kNextMaxId]];
        else if (IKNotNull(info[kNextMaxLikeId]))
            _nextMaxId = [[NSString alloc] initWithString:info[kNextMaxLikeId]];
    }
    return self;
}

and you'l need to add a new define
#define kNextMaxLikeId @"next_max_like_id"

from instagramkit.

pingusNikalex avatar pingusNikalex commented on May 12, 2024

Here is my Fix

if (self && IKNotNull(info) && IKNotNull(info[kNextURL]) && IKNotNull(info[kNextMaxId])) {
    _nextURL = [[NSURL alloc] initWithString:info[kNextURL]];
    _nextMaxId = [[NSString alloc] initWithString:info[kNextMaxId]];
}

WBR, Alexandr Chernyy
Team Lead, Nikolaev
Tatem Games Nikolaev
Skype: pingus_kisya
Phone: +38 (093) 561 56 30
E-mail: [email protected]
www.tatemgames.com

On Mar 18, 2014, at 5:29 PM, ddaddy [email protected] wrote:

This does break other functions. So try this instead:

  • (id)initWithInfo:(NSDictionary *)info
    {
    self = [super init];
    if (self && IKNotNull(info) && [info count] > 0) {
    NSLog(@"%@", info);
    _nextURL = [[NSURL alloc] initWithString:info[kNextURL]];
    if (IKNotNull(info[kNextMaxId]))
    _nextMaxId = [[NSString alloc] initWithString:info[kNextMaxId]];
    else if (IKNotNull(info[kNextMaxLikeId]))
    _nextMaxId = [[NSString alloc] initWithString:info[kNextMaxLikeId]];
    }
    return self;
    }
    and you'l need to add a new define
    #define kNextMaxLikeId @"next_max_like_id"


Reply to this email directly or view it on GitHub.

from instagramkit.

ddaddy avatar ddaddy commented on May 12, 2024

I don't think that will fix it. There is a different json key for nextmax for likes than the other nextmax's.
next_max_like_id next_max_id

from instagramkit.

shyambhat avatar shyambhat commented on May 12, 2024

I'm doing the error checking now, and have also added the additional macro.
Thanks a bunch for the fixes, guys.
You could just fork the project, going ahead and send me pull requests with your fixes so I can review and merge it right from my inbox. This will make things much quicker and also make you contributors of the repo.

from instagramkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.