-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Private account exception on public Profile #706
Comments
Hello, You can get the account like this: |
Hi @CreeperMaxCZ , i tried to get the followers by account id, but i still get the same result `<?php require_once('./vendor/autoload.php'); $instagram = new \InstagramScraper\Instagram(); $profile = $instagram->getAccount('desk2work'); print_r($nonPrivateAccountMedias);` Fatal error: Uncaught InstagramScraper\Exception\InstagramException: Failed to get followers of account id 29641904088. The account is private. in /Users/nicom/Desktop/InstaPHPTest/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php:1283 |
I have a same problem, I think that IG block this function. |
I solved this by passing the account id instead of the account name to the "getAccount" method. |
Everything works fine, except the getFollowers method on public profiles.
In this case, i tried to get the followers of this insta account: https://www.instagram.com/desk2work/
Warning: count(): Parameter must be an array or an object that implements Countable in /Users/nicom/Desktop/InstaPHPTest/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php on line 1282
Fatal error: Uncaught InstagramScraper\Exception\InstagramException: Failed to get followers of account id desk2work. The account is private. in /Users/nicom/Desktop/InstaPHPTest/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php:1283
Stack trace:
#0 /Users/nicom/Desktop/InstaPHPTest/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php(1235): InstagramScraper\Instagram->getPaginateFollowers('desk2work', 20, 20, true, '')
#1 /Users/nicom/Desktop/InstaPHPTest/app.php(7): InstagramScraper\Instagram->getFollowers('desk2work')
#2 {main}
thrown in /Users/nicom/Desktop/InstaPHPTest/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php on line 1283
The text was updated successfully, but these errors were encountered: