Dymantic / laravel-instagram-feed

147 stars 51 forks source link

How can we access the pagination function?? #62

Open ley-288 opened 2 years ago

ley-288 commented 2 years ago

while ($this->shouldFetchNextPage($response, $collection->count(), $limit)) { $response = $this->fetchResponseData($response['paging']['next']); $collection = $collection->merge($response['data']) ->reject(function ($media) { return $this->ignoreVideo($media); }); }

Hi, When I call a var_dump or {{dd($x)}} the ['paging']['next'] is not in the array.

michaeljoyner commented 2 years ago

Hi @ley-288 pagination wasn’t intentionally built into this package. You can just request as many items as you want, and the package will use Instagram’s pagination to get the required amount.