User media with paging
flamme0011 opened this issue · comments
I am trying to get user media with
handler.media.by(user: .primaryKey(InstaId), with: .init(startingAt: self.startingIndex, maxPagesToLoad: 1), updateHandler: nil, completionHandler: {(response, page) in
in page parameter there is a canLoadMore but it is always return false.
if page.canLoadMore{
self.startingIndex = page.nextMaxId!
self.getMedias()
}
Am I doing something wrong or Is there another way to get photos one by one page?
Use updateHandler
instead of completionHandler
.
completionHandler
only returns the "flattened" elements.