Closed a4chris closed 4 years ago
<?php
$api = new Api($cachePool); $api->login($credentials->getLogin(), $credentials->getPassword());
$profile = $api->getProfile('twhiddleston');
//print_r($profile->getMedias); // 12 first medias print_r($profile->getMedias()); // 12 first medias
do { $profile = $api->getMoreMedias($profile); //print_r($profile->getMedias); // 12 more medias print_r($profile->getMedias()); // 12 more medias
// avoid 429 Rate limit from Instagram sleep(1);
} while ($profile->hasMoreMedias());
Nice catch! Could you submit a PR to fixed it?
Thanks 🙏
Don't know how to link a pull requests. Sorry
No worries. I fixed this typo.
Thanks for reporting 😄
<?php
$api = new Api($cachePool); $api->login($credentials->getLogin(), $credentials->getPassword());
$profile = $api->getProfile('twhiddleston');
//print_r($profile->getMedias); // 12 first medias print_r($profile->getMedias()); // 12 first medias
do { $profile = $api->getMoreMedias($profile); //print_r($profile->getMedias); // 12 more medias print_r($profile->getMedias()); // 12 more medias
} while ($profile->hasMoreMedias());