Skip to content
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

script doesn't working error 500 #468

Closed
emobin opened this issue Mar 20, 2019 · 8 comments
Closed

script doesn't working error 500 #468

emobin opened this issue Mar 20, 2019 · 8 comments

Comments

@emobin
Copy link

emobin commented Mar 20, 2019

all examples getting error 500 with below log:

[20-Mar-2019 12:19:43] PHP Fatal error: Uncaught InstagramScraper\Exception\InstagramAuthException: User credentials are wrong. in /home/drrma/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php:1299
Stack trace:
#0 /home/drrma/index.php(10): InstagramScraper\Instagram->login()
#1 {main}
thrown in /home/drrma/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php on line 1299

is there anyone help me, please!!!

@filippodicostanzo
Copy link

Try to use cli method for login.
This with method you can enable the two factor authentication.

@emobin
Copy link
Author

emobin commented Mar 20, 2019

Try to use cli method for login.
This with method you can enable the two factor authentication.

how can i do that? i am new to this script.

@filippodicostanzo
Copy link

filippodicostanzo commented Mar 20, 2019

After you download the package create a index.php file with this code:

require_once __DIR__ . '/vendor/autoload.php';

use InstagramScraper\Instagram;

Unirest\Request::verifyPeer(false);

/* THIS IS CAN INITIALIZE ONLY FOR THE FIRST TIME WITH php command in CMD for 2 FACT - AUTHENTICATOR */

 $instagram = Instagram::withCredentials('username', 'password', '/access');
 $instagram->login(false,true);


And after this you can run index.php with cmd on windows or terminal on osx

go to folder and write php index.php

and you follow the instruction for authentication on CDM or TERMINAL

@emobin
Copy link
Author

emobin commented Mar 20, 2019

After you download the package create a index.php file with this code:

require_once __DIR__ . '/vendor/autoload.php';

use InstagramScraper\Instagram;

Unirest\Request::verifyPeer(false);

/* THIS IS CAN INITIALIZE ONLY FOR THE FIRST TIME WITH php command in CMD for 2 FACT - AUTHENTICATOR */

 $instagram = Instagram::withCredentials('username', 'password', '/access');
 $instagram->login(false,true);

And after this you can run index.php with cmd on windows or terminal on osx

go to folder and write php index.php

and you follow the instruction for authentication on CDM or TERMINAL

it has been make access directory with a file in it, i was upload it in my host and use the below code but i have error 500 yet. what should i now? :((

require_once __DIR__ . '/vendor/autoload.php';
use InstagramScraper\Instagram;
 $instagram = Instagram::withCredentials('exampleuser', 'examplepass', '/access');
 $instagram->login(true,false);
$account = $instagram->getAccountById(3);
echo $account->getUsername();

@filippodicostanzo
Copy link

in your host can you run a php command?
Otherwise you can run a command in local folder on your pc after you install php and you can run this command php index.php with cmd or terminal.

@emobin
Copy link
Author

emobin commented Mar 20, 2019

in your host can you run a php command?
Otherwise you can run a command in local folder on your pc after you install php and you can run this command php index.php with cmd or terminal.

i was run this command in my windows and then upload access folder in my host directory

@filippodicostanzo
Copy link

Do you have teamviewer? if you want i can help you with TW. send me a credentials same ID and CODE via mail [email protected]

@emobin
Copy link
Author

emobin commented Mar 20, 2019

i sent the tw details. thank you very very much bro

@emobin emobin closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants